Exemple #1
0
function GetMoviesByLanguage()
{
    $language = CheckPost('Language');
    $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->Languages()->Filter("Name eq '{$language}'")->Expand('Titles');
    $movies = $query->Execute();
    ShowExpansion($movies->Result);
}
Exemple #2
0
          function clearSearch() {
            searchForm.Genre.selectedIndex = 0
            searchForm.Language.selectedIndex = 0
            searchForm.Name.value = '';
          }

        </script>
    </head>
    <body bgcolor="b9090b">
      <form name="searchForm" method="POST" action="search.php">
      <?php 
require_once 'netflix.php';
session_start();
$_SESSION["token"] = null;
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"]);
    }
    $queryGenres = $netflix->Genres();
    $queryLanguages = $netflix->Languages();
    $_SESSION["current"] = 0;
    function GetGenres($query, $netflix)
    {
        $genres = $query->Execute();
        echo "\n<option value='Undecided'>Undecided</option>";
        $token = null;
        do {
            if ($token != null) {
                $genres = $netflix->Execute($token);
Exemple #3
0
{
    $hours = intval($runtime / 3600);
    $minutes = $runtime / 60 % 60;
    if ($minutes < 10) {
        $minutes = "0" . $minutes;
    }
    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 
Exemple #4
0
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Netflix - oData</title>
  </head>
  <body bgcolor="b9090b">
      <?php 
require_once 'netflix.php';
session_start();
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"]);
    }
    $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;
    ?>
Exemple #5
0
 {
     $hours = intval($runtime / 3600);
     $minutes = $runtime / 60 % 60;
     if ($minutes < 10) {
         $minutes = "0" . $minutes;
     }
     return $hours . ":" . $minutes;
 }
 function SetWidth($rating)
 {
     $imageWidth = 29;
     $newWidth = $imageWidth * $rating;
     return "width: " . $newWidth . "px;";
 }
 require_once 'netflix.php';
 $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"]);
 }
 $dsQueryContinuation = new DataServiceQueryContinuation($_SESSION["token"]);
 $movies = $netflix->Execute($dsQueryContinuation);
 echo '<table border="1px solid gray" bgcolor="FDF8E2" width="900px;" align="center" >';
 echo "<tr><td colspan='2'><div align='center'>";
 //if($_SESSION["token"] != null)
 echo "<input type='button' value='>>' style='float: right;' onclick='window.location=\"moviePaging.php?Next=true\";' />";
 if ($_SESSION["current"] != 0) {
     echo "<input type='button' value='<<' style='float: left;' onclick='window.location=\"moviePaging.php?Last=true\";' />";
 }
 echo "<input type='button' value='Home' onclick='window.location=\"index.php\";' /></div></td></tr>";
 foreach ($movies->Result as $movie) {
Exemple #6
0
{
    $hours = intval($runtime / 3600);
    $minutes = $runtime / 60 % 60;
    if ($minutes < 10) {
        $minutes = "0" . $minutes;
    }
    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