Exemple #1
0
function GetMoviesByName()
{
    $name = CheckPost('Name');
    $netflix = new NetflixCatalog();
    $settings = parse_ini_file("app.config", 1);
    if (!empty($settings["HTTP_PROXY_HOST"])) {
        $netflix->HttpProxy = new HttpProxy($settings["HTTP_PROXY_HOST"], $settings["HTTP_PROXY_PORT"], $settings["HTTP_PROXY_USER_NAME"], $settings["HTTP_PROXY_PASSWORD"]);
    }
    $query = $netflix->Titles()->Filter("startswith(Name,'{$name}')")->OrderBy("Name");
    $movies = $query->Execute();
    Show($movies->Result);
}
Exemple #2
0
    }
    return $hours . ":" . $minutes;
}
function SetWidth($rating)
{
    $imageWidth = 29;
    $newWidth = $imageWidth * $rating;
    return "width: " . $newWidth . "px;";
}
try {
    $netflix = new NetflixCatalog();
    $settings = parse_ini_file("app.config", 1);
    if (!empty($settings["HTTP_PROXY_HOST"])) {
        $netflix->HttpProxy = new HttpProxy($settings["HTTP_PROXY_HOST"], $settings["HTTP_PROXY_PORT"], $settings["HTTP_PROXY_USER_NAME"], $settings["HTTP_PROXY_PASSWORD"]);
    }
    $query = $netflix->Titles()->Filter("Type eq 'Season'")->OrderBy("Name");
    $movies = $query->Execute();
    ?>
    <table border="1px solid gray" bgcolor="FDF8E2" width="900px;" align="center">
<?php 
    foreach ($movies->Result as $movie) {
        echo "      <tr>\n<td>\n<a href='{$movie->Url}'>\n<img alt='" . $movie->Name . "' src='" . $movie->BoxArt->LargeUrl . "'>\n</a>\n</td>" . "\n<td>\n<p>\n<span style='font-size: larger;'>" . $movie->Name . "\n</span> " . "\n<span style='font-size: smaller;'>({$movie->ReleaseYear})\n</span>\n</p>" . "\n{$movie->Synopsis}\n<br />\n" . "Rating:\n<span style='background: url(\"images/spite_Punk_Star.jpg\") repeat-x; height: 29px; " . SetWidth($movie->AverageRating) . "'>&nbsp;</span>, Runtime: " . RunTime($movie->Runtime) . "\n</td>\n</tr>\n";
    }
    ?>
      </table>
      <?php 
} catch (Exception $e) {
    echo $e->getMessage();
}
?>
    </body>
Exemple #3
0
    $settings = parse_ini_file("app.config", 1);
    if (!empty($settings["HTTP_PROXY_HOST"])) {
        $netflix->HttpProxy = new HttpProxy($settings["HTTP_PROXY_HOST"], $settings["HTTP_PROXY_PORT"], $settings["HTTP_PROXY_USER_NAME"], $settings["HTTP_PROXY_PASSWORD"]);
    }
    $token = null;
    if (key_exists("Last", $_GET)) {
        $_SESSION["current"] = $_SESSION["current"] - 1;
    } else {
        if (key_exists("Next", $_GET)) {
            $_SESSION["current"] = $_SESSION["current"] + 1;
        } else {
            $_SESSION["current"] = 0;
        }
    }
    $skip = 5 * $_SESSION["current"];
    $query = $netflix->Titles()->Filter("Type eq 'Movie'")->Top(5)->Skip($skip);
    $token = $query->RequestUri();
    $_SESSION["token"] = $token;
    ?>

    <div id="Loading" align="center" />
      <?php 
} catch (DataServiceRequestException $e) {
    echo "Message: " . $e->getTraceAsString();
}
?>
    </body>
    <script type="text/javascript">
      function onStartup() {
        xmlhttp = new XMLHttpRequest();
        xmlhttp.onreadystatechange = function() {
Exemple #4
0
    }
    return $hours . ":" . $minutes;
}
function SetWidth($rating)
{
    $imageWidth = 29;
    $newWidth = $imageWidth * $rating;
    return "width: " . $newWidth . "px;";
}
try {
    $netflix = new NetflixCatalog();
    $settings = parse_ini_file("app.config", 1);
    if (!empty($settings["HTTP_PROXY_HOST"])) {
        $netflix->HttpProxy = new HttpProxy($settings["HTTP_PROXY_HOST"], $settings["HTTP_PROXY_PORT"], $settings["HTTP_PROXY_USER_NAME"], $settings["HTTP_PROXY_PASSWORD"]);
    }
    $query = $netflix->Titles()->Filter("Type eq 'Movie'")->OrderBy("Name");
    $movies = $query->Execute();
    ?>
    <table border="1px solid gray" bgcolor="FDF8E2" width="900px;" align="center">
<?php 
    foreach ($movies->Result as $movie) {
        echo "      <tr>\n<td>\n<a href='{$movie->Url}'>\n<img alt='" . $movie->Name . "' src='" . $movie->BoxArt->LargeUrl . "'>\n</a>\n</td>" . "\n<td>\n<p>\n<span style='font-size: larger;'>" . $movie->Name . "\n</span> " . "\n<span style='font-size: smaller;'>({$movie->ReleaseYear})\n</span>\n</p>" . "\n{$movie->Synopsis}\n<br />\n" . "Rating:\n<span style='background: url(\"images/spite_Punk_Star.jpg\") repeat-x; height: 29px; " . SetWidth($movie->AverageRating) . "'>&nbsp;</span>, Runtime: " . RunTime($movie->Runtime) . "\n</td>\n</tr>\n";
    }
    ?>
      </table>
      <?php 
} catch (Exception $e) {
    echo $e->getMessage();
}
?>
    </body>