Example #1
0
 /** Get all possible trailers
  * @method getAllTrailers
  * @param string mid IMDB ID
  * @return array [0..n] of array[url,format] of movie trailers
  */
 function getAllTrailers($mid)
 {
     $movie = new \Imdb\Title($mid, $this->config);
     $arraytrailers = $movie->videosites();
     $list = array();
     foreach ($arraytrailers as $trail) {
         unset($tl);
         $tmp = strtolower($trail['url']);
         if (strpos($tmp, "www.moviemaze.de") !== FALSE) {
             $tl = $this->getFlashCodeMovieMaze($trail['url']);
         } elseif (strpos($tmp, "alltrailers.net") !== FALSE) {
             $tl = $this->getFlashCodeAllTrailers($trail['url']);
         } elseif (strpos($tmp, "imdb.com/rg/video_title/gallery") !== FALSE) {
             $tl = $this->getImdbTrailers($trail['url']);
         } elseif (strpos($tmp, "www.movieplayer.it") !== FALSE) {
             $tl = $this->getMoviePlayerTrailers($trail['url']);
         } elseif (strpos($tmp, "azmovietrailers.com") !== FALSE) {
             $tl = $this->getAZMovieTrailers($trail['url']);
         } elseif (strpos($tmp, "youtube.com") !== FALSE) {
             $tl = $this->getYoutubeTrailers($trail['url']);
         }
         if (isset($tl)) {
             $list = array_merge($list, $tl);
         }
     }
     return $list;
 }
Example #2
0
<?php

#############################################################################
# IMDBPHP                              (c) Giorgos Giagas & Itzchak Rehberg #
# written by Giorgos Giagas                                                 #
# extended & maintained by Itzchak Rehberg <izzysoft AT qumran DOT org>     #
# http://www.izzysoft.de/                                                   #
# ------------------------------------------------------------------------- #
# This program is free software; you can redistribute and/or modify it      #
# under the terms of the GNU General Public License (see doc/LICENSE)       #
#############################################################################
require __DIR__ . "/../bootstrap.php";
if (isset($_GET["mid"]) && preg_match('/^[0-9]+$/', $_GET["mid"])) {
    $movieid = $_GET["mid"];
    $movie = new \Imdb\Title($_GET["mid"]);
    $source = "<B CLASS='active'>IMDB</B>";
    $rows = 2;
    // count for the rowspan; init with photo + year
    echo "<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'>\n";
    echo "<HTML><HEAD>\n";
    echo " <TITLE>" . $movie->title() . ' (' . $movie->year() . ") [IMDBPHP v" . $movie->version . " Demo]</TITLE>\n";
    echo " <STYLE TYPE='text/css'>body,td,th { font-size:12px; font-family:sans-serif; } b.active { color:#b00;background-color:#fff;text-decoration:underline;}</STYLE>\n";
    echo " <META http-equiv='Content-Type' content='text/html; charset=utf8'>\n";
    echo "</HEAD>\n<BODY ONLOAD='fix_colspan()'>\n<TABLE BORDER='1' ALIGN='center' STYLE='border-collapse:collapse'>";
    # Title & year
    echo '<TR><TH COLSPAN="3" STYLE="background-color:#ffb000">';
    echo "[IMDBPHP v" . $movie->version . " Demo] Movie Details for '" . $movie->title() . "' (" . $movie->year() . ")";
    echo "<SPAN STYLE='float:right;text-align:right;display:inline !important;font-size:75%;'>Source: [{$source}]</SPAN>";
    echo "</TH></TR>\n";
    flush();
    # Photo
Example #3
0
 public function testTitle_different_language()
 {
     $config = new \Imdb\Config();
     $config->language = 'de-de';
     $config->cachedir = realpath(dirname(__FILE__) . '/cache') . '/';
     $title = new \Imdb\Title(3110958, $config);
     $this->assertEquals('Die Unfassbaren 2', $title->title());
 }