Example #1
0
     }
     break;
 case 'site':
     echo "<h3>Response is </h3> {$content}";
     $total_return = $row['response'];
     $current_file = "app_keyword/response/id/" . $row['id'];
     $source_machine = "db";
     break;
 case 'location':
     $app_key = $row['app_key'];
     $url = "";
     $user = md5($number);
     if ($operator == "airtel" && $row['type'] == 'location') {
         echo "<h2>LOC BASED APP</h2>";
         $url .= "?mobile={$user}&region={$tele_state}";
         $data = getLocAPI($number, 3600);
         if (!empty($data["lat"]) && !empty($data["long"])) {
             $lat = round($data["lat"], 2);
             $long = round($data["long"], 2);
             $url .= "&lat={$lat}&long={$long}";
         }
         if (!empty($data["city"])) {
             $city = strtolower($data["city"]);
             $url .= "&city={$city}";
         }
         if (!empty($data["state"])) {
             $state = strtolower($data["state"]);
             $url .= "&state={$state}";
         }
         if (!empty($data["district"])) {
             $district = strtolower($data["district"]);
Example #2
0
            return "Showtimes for {$movie_title}\n" . $return;
        } else {
            return '';
        }
    }
}
$localmovie = false;
$showcity = '';
if ($operator == 'du') {
    echo "<br>SHOWTIME DU<br>";
    include 'showtimes_du.php';
    echo "<br><h2>TIME after SHOWTIME DU :" . (microtime(TRUE) - $time_start) . "</h2><br>";
} else {
    if (($spell_checked == "showtimes" || $spell_checked == "showtime") && $operator == "airtel") {
        //for location API
        $showdata = getLocAPI($number);
        var_dump($showdata);
        if (!empty($showdata["city"])) {
            echo $spell_checked = "showtimes " . trim($showdata["city"]);
        }
    }
    // modified on 18/01/2013
    $show_req = preg_replace("~\\b((movie|show|time|timing|showtime|showtiming)s?)\\b~", '', $spell_checked);
    $show_req = trim(preg_replace("~[\\s]+~", " ", $show_req));
    if (preg_match("~(.*) (in|at|near) (.+)~", $spell_checked, $matches)) {
        echo "<br>Matched Preg1";
        $localmovie = new LocalMovie($matches[3], $matches[1]);
        $nowrun_city = $matches[3];
        $jdial_city = $matches[3];
    } else {
        require_once 'binary_search.php';