1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Movieposters are f*cked, any clue?

Discussion in 'PHP & Perl' started by 19w08, Jan 17, 2009.

  1. 19w08

    19w08 Guest

    So i installed a movietrailer script to one of my dusty domains.

    Code:
    http://www.celebmoviesfree.com/
    The vids are coming from yahoo, problem is the movieposters are broken.

    Now, one of them is working ok.

    Code:
    http://us.ent3.yimg.com/movies.yahoo.com/images/hv/photo/movie_pix/miramax_films/brideshead_revisited/bridesheadrevisited_poster-th.jpg
    The others are f*cked.

    This is the source code, tried to find it but i am stuck.

    Code:
    <?
    
    function xmlstr($string, $start, $end){
    
            $string = " ".$string;
    
            $ini = strpos($string,$start);
    
            if ($ini == 0) return "";
    
            $ini += strlen($start);   
    
            $len = strpos($string,$end,$ini) - $ini;
    
            return substr($string,$ini,$len);
    
    }
    
    
    
    //----------------------------------------------------------
    
    
    
    function newtrailers(){
    
    $res = file_get_contents("http://rss.ent.yahoo.com/movies/newtrailers.xml");
    
    $res = explode("<item>", $res);
    
    
    
    $i=1;
    
    while ($i<=10) {
    
    $cres = $res[$i];
    
    $title = xmlstr($cres, "<title>", "</title>");
    
    $description = html_entity_decode(htmlspecialchars_decode(xmlstr($cres, "<description>", "</description>")));
    
    $url = xmlstr($cres, "<media:player url=\"", "\"");
    
    $image = xmlstr($cres, "<media:thumbnail height=\"74\" url=\"", "\"");
    
    
    
    $link = "play.php?v=" . str_replace("http://movies.yahoo.com/movie/", "", $url);
    
    
    
    
    
    if ($title) {
    
    
    
    	if ($i&1) {
    
    	$col = "#f3faff";
    
    	}else{	
    
    	$col = "#e6edf3";	
    
    	}  
    
    
    
    $val = $val . "
    
    <table width=\"400\" border=\"0\" bgcolor=\"$col\"><tr><td valign=\"top\" width=\"55\">
    
    <img src=\"$image\"></td>
    
    <td valign=\"top\"><b><a href=\"$link\" onclick=\"return popitup('$link')\">$title</a></b><br />$description<br /><br /></td></tr></table>
    
    
    
    ";
    
    }
    
    $i++;
    
    }
    
    return $val;
    
    }
    
    
    
    //--------------------------------------------------------------
    
    
    
    function toptrailers(){
    
    $res = file_get_contents("http://rss.ent.yahoo.com/movies/top25trailers.xml");
    
    $res = explode("<item>", $res);
    
    
    
    $i=1;
    
    while ($i<=25) {
    
    $cres = $res[$i];
    
    $title = xmlstr($cres, "<title>", "</title>");
    
    $description = html_entity_decode(htmlspecialchars_decode(xmlstr($cres, "<description>", "</description>")));
    
    $url = xmlstr($cres, "<media:player url=\"", "\"");
    
    $image = xmlstr($cres, "<media:thumbnail height=\"74\" url=\"", "\"");
    
    
    
    $link = "play.php?v=" . str_replace("http://movies.yahoo.com/movie/", "", $url);
    
    
    
    if ($title) {
    
    
    
    	if ($i&1) {
    
    	$col = "#f3faff";
    
    	}else{	
    
    	$col = "#e6edf3";	
    
    	}  
    
    
    
    $val = $val . "
    
    <table width=\"400\" border=\"0\" bgcolor=\"$col\"><tr><td valign=\"top\" width=\"55\">
    
    <img src=\"$image\"></td>
    
    <td valign=\"top\"><b><a href=\"$link\" onclick=\"return popitup('$link')\">$title</a></b><br />$description<br /><br /></td></tr></table>
    
    
    
    ";
    
    }
    
    $i++;
    
    }
    
    return $val;
    
    }
    
    
    
    
    
    //------------------------------------------------------------------------------------
    
    
    
    function player($url) {
    
    $tr = file_get_contents("http://movies.yahoo.com/movie/" . $url);
    
    $tr = explode("<c id=\"", $tr);
    
    $tr = explode("\"", $tr[1]);
    
    $tr = "http://l.yimg.com/cosmos.bcst.yahoo.com/ver/251.6/embed-2007-12-18-1554/fullscreen.html?popupEnable=0&shareEnable=0&eAutoStart=" . $tr[0];
    
    
    
    return "<iframe frameborder=\"0\" width=\"800\" height=\"650\" src=\"$tr\">";
    
    }
    
    ?>
    Some of my fellow members have a clue to fix this?
     
  2. 19w08

    19w08 Guest

    *bump* No one?
     
  3. fxmaster

    fxmaster Regular Member

    Joined:
    Dec 20, 2007
    Messages:
    219
    Likes Received:
    478
    I think it might be because they are no movies inserted in the rss. But you can use youtube as they have the videos in the rss. Sorry i can't really go into much detail on this.

    http://gdata.youtube.com/feeds/base/standardfeeds/GB/top_favorites?client=ytapi-youtube-browse&alt=rss&time=today i think thats how the yahoo trailer rss should be.
     
  4. 19w08

    19w08 Guest

    hi fxmaster,

    TY kindly for your reply. Well the feed you got me wasnt working, but you brought me to another idea :D

    Have to work that out properly when i get some time.

    Thanks man!
     
  5. fxmaster

    fxmaster Regular Member

    Joined:
    Dec 20, 2007
    Messages:
    219
    Likes Received:
    478
    Code:
    hxxp://www.blackhatworld.com/blackhat-seo/redirect-to/?redirect=http%3A%2F%2Fgdata.youtube.com%2Ffeeds%2Fbase%2Fstandardfeeds%2FGB%2Ftop_favorites%3Fclient%3Dytapi-youtube-browse%26alt%3Drss%26time%3Dtoday
    Sorry i forgot to code the link and np.
     
  6. 19w08

    19w08 Guest

    Hi fxmaster.

    Yeah is was aware of that feed. Didn't work out though as i was looking more for celeb movies. Think i give it more a adult twist now, as it was originally ment to be.

    Much appreciated though! ;)