Ejemplo n.º 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;
 }