Thread: Imdb
View Single Post
  #19  
Old 25th November 2018, 18:58
Tankcsapda Tankcsapda is offline
Member
 
Join Date: Nov 2011
Hungary
Posts: 10
Default my little bit more.
PHP Code:
<?
/***********************************************/
/*=========[TS Special Edition v.5.6]==========*/
/*=============[Special Thanks To]=============*/
/*        DrNet - wWw.SpecialCoders.CoM        */
/*          Vinson - wWw.Decode4u.CoM          */
/*    MrDecoder - wWw.Fearless-Releases.CoM    */
/*           Fynnon - wWw.BvList.CoM           */
/***********************************************/
    

      
function cleanstring$imputString )
{
    
$whatToCleanArray = array(
        
chr13 ),
        
chr10 ),
        
chr13 ).chr10 ),
        
chr10 ).chr13 ),
        
"\n",
        
"  ",
        
"   ",
        
"    ",
        
"\n\n",
        
"\n\r",
        
"<br>",
        
"<br/>",
        
"<br />"
    
);
    
$cleanWithArray = array( """""""""""""""""""""""""" );
    
$cleaned str_replace$whatToCleanArray$cleanWithArray$imputString );
    
$cleaned trim$cleaned );
    return 
$cleaned;
}

function 
fetch_data$url$cleantext true )
{
    @
ini_set"user_agent""TS_SE via cURL/PHP" );

    
$data false;
    
$timeout 10;
    if ( 
function_exists"curl_init" ) && ( $ch curl_init( ) ) )
    {
        
$CURLUSED true;
        
curl_setopt$chCURLOPT_URL$url );
        
curl_setopt$chCURLOPT_RETURNTRANSFER);
        
curl_setopt$chCURLOPT_CONNECTTIMEOUT$timeout );
//        curl_setopt( $ch, CURLOPT_HTTPHEADER, array('Accept-Charset: UTF-8'));


    
curl_setopt$chCURLOPT_ContentType, array("Accept-Language: en-US"));
        
$data curl_exec$ch );
        
curl_close$ch );


    }
    if ( !isset( 
$CURLUSED ) && !$data && ini_get"allow_url_fopen" ) )
    {
        
$old ini_set"default_socket_timeout"$timeout );
        
$contents "";
        
        
        if ( 
$handle = @fopen$url"rb" $context) )
        {
            
ini_set"default_socket_timeout"$old );
            
stream_set_timeout$handle$timeout );
            
stream_set_blocking$handle);
            while ( !
feof$handle ) )
            {
                
$contents .= fread$handle8192 );
            }
            
fclose$handle );
            
$data $contents;
            unset( 
$contents );
        }
    }
    return 
$data $cleantext == true cleanstring$data ) : $data false;
}  

function 
match_all($regex$str$i 0) {
    if (
preg_match_all$regex$str$matches ) === false) {
        return 
false;
    }

    return 
$matches[$i];
}

function 
get_match($regex$content) {
    
preg_match$regex$content$matches );
    return (isset( 
$matches[1] ) ? trim$matches[1] ) : false);
}

function 
match($regex$str$i 0) {
    if (
preg_match$regex$str$match ) == 1) {
        return 
$match[$i];
    }

    return 
false;
}

  @
error_reporting (E_ALL & ~E_NOTICE);
  @
ini_set ('error_reporting'E_ALL & ~E_NOTICE);
  @
ini_set ('display_errors''0');
  @
ini_set ('log_errors''1');
  @
ini_set ('max_execution_time''20000');
  @
ini_set ('max_input_time''20000');
  
define ('TS_IMDB_VERSION''0.9 by xam');
  if (((!
defined ('IN_TRACKER') OR !defined ('IN_SCRIPT_TSSEv56')) OR !defined ('TU_VERSION')))
  {
    exit (
'<font face=\'verdana\' size=\'2\' color=\'darkred\'><b>Error!</b> Direct initialization of this file is not allowed.</font>');
  }

  
$regex '#http://www.imdb.com/title/(.*)/#U';
  
preg_match ($regex$t_link$_id_);
  
$_id_ $_id_[1];
  
$url '' 'https://www.imdb.com/title/' $_id_ '/';
  
$text fetch_data ($url);
 

  
 
$poster match'/poster">.*?<img.*?src="(.*?)".*?<\/td>/ms'$text);

if (( ( 
$poster != '' && strrpos$poster'nopicture' ) === false ) && strrpos$poster'ad.doubleclick' ) === false )) {
    
file_put_contents'' $torrent_dir '/images/' $_id_ '.jpg'fetch_data$posterfalse ) );
    
$poster '' $BASEURL '/' $torrent_dir '/images/' $_id_ '.jpg';
}
else {
    
$poster '';
}

$directors = array(  );
foreach (
match_all'/<a.*?>(.*?)<\/a>/ms'match'/Director.?:(.*?)(<\/div>|>.?and )/ms'$text), ) as $m) {
    
array_push$directors$m );
}
$directors strip_tagsimplode', '$directors ) );

$writers = array(  );
foreach (
match_all'/<a.*?>(.*?)<\/a>/ms'match'/Writer.?:(.*?)(<\/div>|>.?and )/ms'$text), ) as $m) {

    if (!
preg_match'#more credit#'$m )) {
        
array_push$writers$m );
        continue;
    }
}
$writers strip_tagsimplode', '$writers ) );

$stars = array(  );
foreach (
match_all'/<a.*?>(.*?)<\/a>/ms'match'/Stars.?:(.*?)(<\/div>| See full cast and crew)/ms'$text), ) as $m) {

    if (!
preg_match'#more credit#'$m )) {
        
array_push$stars$m );
        continue;
    }
}
$stars strip_tagsimplode', '$stars ) );

  
$regex '#<title>(.*)</title>#U';
  
preg_match_all ($regex$text$titlePREG_SET_ORDER);
  
$regex '#<div class="txt-block"><h4 class="inline">Budget:</h4>(.*)</div>#U';
  
preg_match_all ($regex$text$budgetPREG_SET_ORDER);
  
$regex '#<div class="txt-block"><h4 class="inline">Also Known As:</h4>(.*)<a#U';
  
preg_match_all ($regex$text$alsoknownasPREG_SET_ORDER);
  
$regex '#<div class="txt-block"><h4 class="inline">Aspect Ratio:</h4>(.*)</div>#U';
  
preg_match_all ($regex$text$aspectratioPREG_SET_ORDER);
  
$regex '#<a[^>]* data-video="(.*)"[^>]*>(.*)<span#U';
  
preg_match_all ($regex$text$trailerPREG_SET_ORDER);
  
$regex '#<div class="txt-block"><h4 class="inline">Taglines:</h4>(.*)</div>#U';
  
preg_match_all ($regex$text$taglinesPREG_SET_ORDER);
  
$regex '#<div class="txt-block"><h4 class="inline">Filming Locations:</h4>(.*)<span class="see-more inline"#U';
  
preg_match_all ($regex$text$filminglocationsPREG_SET_ORDER);
  
$title strip_tags ($title[0][1]);
  
$regex '#<div class="txt-block"><h4 class="inline">Language:</h4><a(.*)>(.*)</div>#U';
  
preg_match_all ($regex$text$languagePREG_SET_ORDER);
  
$regex '#<h2>Cast</h2>(.*)</div>#U';
  
preg_match_all ($regex$text$castPREG_SET_ORDER); 

  
$regex '#<span class="rating">(.*)</span>#U';
  
preg_match_all ($regex$text$ratingPREG_SET_ORDER);

  
$regex '#<span class="small" itemprop="ratingCount">(.*)</span>#U';
  
preg_match_all ($regex$text$votesPREG_SET_ORDER);

  
$trailers '' 'https://www.imdb.com/video/imdb/' $trailer[0][1] . '';

  
  
$genres = array(  );
   foreach (
match_all'/<a.*?>(.*?)<\/a>/ms'match'/Genre.?:(.*?)(<\/div>|See more)/ms'$text), ) as $m) {
    
array_push$genres$m );
}

  
$soundmix = array(  );
   foreach (
match_all'/<a.*?>(.*?)<\/a>/ms'match'/Sound Mix.?:(.*?)(<\/div>|See more)/ms'$text), ) as $m) {
    
array_push$soundmix$m );
}

  
$country = array(  );
   foreach (
match_all'/<a.*?>(.*?)<\/a>/ms'match'/Country.?:(.*?)(<\/div>|See more)/ms'$text), ) as $m) {
    
array_push$country$m );
}

  
$plotkeywords = array(  );
   foreach (
match_all'/<a.*?>(.*?)<\/a>/ms'match'/Plot Keywords.?:(.*?)(<\/div>|See more)/ms'$text), ) as $m) {
    
array_push$plotkeywords$m );
}




  
$genres strip_tagsimplode' | '$genres ) );
  
$soundmix strip_tagsimplode' | '$soundmix ) );
  
$country strip_tagsimplode' | '$country ) );
  
$plotkeywords strip_tagsimplode' | '$plotkeywords ) );  
//  $rating = strip_tags( match( '/itemprop="ratingValue">([0-9].[0-9])<\/span>/ms', $text, 1 ) );
//  $votes = strip_tags( match( '/<span itemprop="ratingCount">(.*?)<\/span>/ms', $text, 1 ) );
  
$release_date strip_tagsmatch'/Release Date:<\/h4>.*?([0-9][0-9]? (January|February|March|April|May|June|July|August|September|October|November|December) (19|20)[0-9][0-9]).*?(\(|<span)/ms'$text) );
  
$run_time strip_tagsget_match'/Runtime:<\/h4>(.*)<\/div>/isU'$text ) );
  
$storyline strip_tagsmatch'/Storyline<\/h2>(.*)<\/div>/isU'$text ) );


  
$officialsites get_match'/Official Sites:<\/h4>(.*)<span class="see-more inline">/isU'$text );
  if (
$officialsites !== false)
  
$officialsites str_replace('/offsite/''https://www.imdb.com/offsite/'$officialsites);
  
$officialsites str_replace('<a ''<a target="_blank" '$officialsites);

  
preg_match_all'#<div class="mediastrip">(.*)<\/div>#isU'$text$photos ); 
  if (isset( 
$photos['1']['0'] )) {
    
preg_match_all'#https:\/\/m\.media-amazon.com\/images\/M\/(.*)\.jpg#isU'$photos['1']['0'], $photourls );

}

$extra '';
$photoarray = array(  );

if (( isset( 
$photourls['0'] ) && count$photourls['0'] ) )) {
    foreach (
$photourls['0'] as $pid => $photo) {
        
$ext get_extension$photo );
        
$photoname '' $torrent_dir '/images/' $_id_ '_photo' $pid '.' $ext;

        if (
file_exists$photoname )) {
            @
unlink$photoname );
        }


        if (
$handle fopen$photoname'x' )) {
            if (
fwrite$handlefetch_data$photofalse ) )) {
                
$photoarray[] = $BASEURL '/' $photoname;
            }

            
fclose$handle );
            continue;
        }
    }


    if (( 
$photoarray && count$photoarray ) )) {
        
$extra '<br /><div align="center">';
        foreach (
$photoarray as $photo) {
            
$extra .= ' <img src="' $photo '" alt="" title="" border="0" /> ';
        }

        
$extra .= '</div>';
    }
}

   
$t_link '' '<table width=\'100%\' border=\'0\' align=\'center\' class=\'none\'><tr><td colspan=\'2\' class=\'none\' align=\'left\'><b>' $title '</b></td></tr><tr><td class=\'none\' align=\'center\' valign=\'top\'>' . ($poster '<img src=\'' $poster '\' border=\'0\' alt=\'' $title '\' title=\'' $title '\'>' '') . '</td><td class=\'none\' valign=\'top\' align=\'left\'>' . ($alsoknownas[0][1] ? '<b>Also known as:</b> ' strip_tags (str_replace ('more'''$alsoknownas[0][1])) . '<br />' '') . ($officialsites '<b>Official sites:</b> ' $officialsites '<br />' '') . '<b>Director/s:</b> ' $directors '<br />' '<b>Writer/s:</b> ' $writers '<br />' '<b>Stars:</b> ' $stars '<br /><b>Cast:</b> ' strip_tags (str_replace ('more'''$cast[0][1])) . '<br />' '<b>Genre:</b> ' $genres '<br />' . ($release_date '<b>Release date:</b> ' $release_date '<br />' '') . '<b>User Rating:</b> ' strip_tags ($rating[0][1]) . ' (' $votes[0][1] . ' szavazat)' . ('' '<br /><b>Language:</b> ' strip_tags (str_replace ('more'''$language[0][2])) . '<br /><b>Country:</b> ' $country '<br />') . ($filminglocations[0][1] ? '<b>Filming locations:</b> ' strip_tags (str_replace ('more'''$filminglocations[0][1])) . '<br />' '') . ($run_time '<b>Runtime:</b> ' $run_time '' '') . ($budget[0][1] ? '<br /><b>Budget:</b> ' $budget[0][1] . '' '') . ($soundmix '<br /><b>Sound mix:</b> ' $soundmix '' '') . ($aspectratio[0][1] ? '<br /><b>Aspect ratio:</b> ' $aspectratio[0][1] . '' '') . '<br /><b>Storyline:</b> ' $storyline . ($plotkeywords '<br /><b>Plot keywords:</b> ' $plotkeywords '' '') . ($taglines[0][1] ? '<br /><b>Taglines:</b> ' strip_tags (str_replace ('more'''$taglines[0][1])) . '' '') . ('' '<br /><b>IMDb link:</b> <a href=\'' $t_link '\' target=\'_blank\' alt=\'' $title '\' title=\'' $title '\'>' $t_link '</a>' $extra '</td></tr></table>' . ($trailer[0][1] ? '<br /><table width=\'100%\' border=\'0\' cellpadding=\'5\' cellspacing=\'0\'><tr><td align=\'center\' class=\'subheader\'><a href=\'' $trailers '\' target=\'_blank\' alt=\'' $title '\' title=\'' $title '\'><img border="0" class="inlineimg" src=\'' $BASEURL '/images/trailer.png\'></a></td></tr></table>' '') . '');
  
?>
Attached Thumbnails
Screenshot_19.jpg  

Last edited by Tankcsapda; 25th November 2018 at 19:21.
Reply With Quote