Bravo List
Register
Go Back   > Bravo List > Torrents Trackers > YSE
Reply
  #1  
Old 01-12-12, 20:01
mat22's Avatar
mat22 mat22 is offline
Senior Member
 
Join Date: Jun 2009
Latvia
Posts: 119
Default TV series/games/movies
Hello!
I already have something like this but I have to enter everything manually by hand and it's real pain in the ass. So I need script that takes information about movies, games and TV series that are coming out in future and shows them like a list with maybe iamges on my tracker. I don't need anything fancy - I just need base script that takes those things, adds custom image (for example, if it's Walking Dead series it adds Walking Dead logo) and shows on my tracker. I will modify the script later by myself.
Reply With Quote
  #2  
Old 02-12-12, 02:57
wMan's Avatar
wMan wMan is offline
Banned
 
Join Date: Feb 2008
P2P
Posts: 1,433
Thumbs up
try this edit to your needs
@root call it shows.php

PHP Code:
<?
    ob_start("ob_gzhandler");

require "include/bittorrent.php";
dbconn(false);
loggedinorreturn();
hit_count();
stdhead(Episodes);


//define shows here
$showcount = 4;


$showname[1] = "Lost";
$showimg[1] ="pic/episodes/lost.jpg";

$showname[2] = "Prison Break";
$showimg[2] ="pic/episodes/prbreak.jpg";

$showname[3] = "Heroes";
$showimg[3] ="pic/episodes/heroes.jpg";

$showname[4] = "24";
$showimg[4] ="pic/episodes/24.jpg";
//end


function get_show($show,$exact="",$episode="") {

if ( !$show ) { return FALSE; }

if ( $fp = fopen("http://www.tvrage.com/quickinfo.php?show=".urlencode($show)."&ep=".urlencode($episode)."&exact=".urlencode($exact),"r") )
  {
  while ( !feof($fp))
    {
    $line = fgets($fp,1024);
    list ($sec,$val) = explode('@',$line,2);
    if ($sec == "Show Name" )
      {
      $ret[0] = $val;
      }
    elseif ( $sec == "Show URL" )
      {
      $ret[1] = $val;
      }
    elseif ( $sec == "Premiered" )
      {
      $ret[2] = $val;
      }
    elseif ($sec == "Country" )
      {
      $ret[7] = $val;
      }
    elseif ( $sec == "Status" )
      {
      $ret[8] = $val;
      }
    elseif ( $sec == "Classification" )
      {
      $ret[9] = $val;
      }

    elseif ( $sec == "Latest Episode" )
      {
      list ($ep,$title,$airdate) = explode('^',$val);
      $ret[3] = $ep.", \"".$title."\" aired on ".$airdate;
      }
    elseif ( $sec == "Next Episode" )
      {
      list ($ep,$title,$airdate) = explode('^',$val);
      $ret[4] = $ep.", \"".$title."\" airs on ".$airdate;
      }
    elseif ( $sec == "Episode Info" )
      {
      list ($ep,$title,$airdate) = explode('^',$val);
      $ret[5] = $ep.", \"".$title."\" aired on ".$airdate;
      }
    elseif ( $sec == "Episode URL" )
      {
      $ret[6] = $val;
      }
    }
  fclose($fp);
  if ( $ret[0] )
    {
    return $ret;
    }
  }
else
  {
  return FALSE;
  }
}

//search
?>
<br><br>
<table width=800 cellpadding=1>
<tr>
<td class=colhead align=center>Search</td>
<tr><td align=center>
<form action='http://www.tvrage.com/search.php' method='GET'>
Search For: <select name='sonly'><option value='0'>Shows & People</option><option value='1'>Shows</option><option value='2'>People</option></select>
<input type='text' name='search'>
<input type='submit' value='Search!'>
</form>
</td></tr>
</tr>
</table>
<br><br>
<?
//end of search

for($i = 1; $i < $showcount+1; $i++) { 
$show_infos1 = get_show("$showname[$i]","1");

//view shows
print("<table border=1 width=500 cellspacing=0 cellpadding=1>\n");
print("<tr><td class=colhead align=center>".$show_infos1[0]."</td>\n");
print("<tr><td class=colhead align=center><img src=$showimg[$i]></td></tr>\n");
print("<tr><td align=center><table border=0 width=745 cellspacing=0 cellpadding=2>\n");
print("<tr><td class=colhead align=center>Last Episode</td>\n");
print("<td>".$show_infos1[3]."</td></tr>\n");
print("<tr><td class=colhead align=center>Next Episode</td>\n");
print("<td>".$show_infos1[4]."</td></tr>\n");
print("<tr><td class=colhead align=center>Country</td>\n");
print("<td>".$show_infos1[7]."</td></tr>\n");
print("<tr><td class=colhead align=center>Status</td>\n");
print("<td>".$show_infos1[8]."</td></tr>\n");
print("<tr><td class=colhead align=center>Show Link</td>\n");
print("<td><a  class=altlink target=_blank href=".$show_infos1[1].">Link</a></td></tr>\n");
print("</tr></table>\n");
print("</tr></table><br><br>\n");
}

//end


//start rss read
define('MAGPIE_DIR', 'magpierss/');
define('MAGPIE_CACHE_DIR', 'cache/magpie_cache');
require_once(MAGPIE_DIR. 'rss_fetch.inc');


print("<table border=1 width=800 cellspacing=0 cellpadding=3>\n");
print("<tr>\n\t<td class=colhead align=center width=60>Time</td>\n\t<td class=colhead align=center width=220>Name</td>\n\t<td class=colhead align=center width=220>Description</td>\n</tr>\n");

$url = 'http://www.tvrage.com/myrss.php';
if ( $url ) {
    $rss = fetch_rss( $url );
    foreach ($rss->items as $item) {
        if ($item['description']=='') $chas = $item['title'];
        $href = $item['link'];
        $title = $item['title'];
        $title = str_replace(" - ","",$title);
              $description = $item['description']; 
              if ($item['description']<>'') print("<tr>\n\t<td align=center>$chas</td>\n\t<td align=center><a target =_blank href=$href>$title</a></td>\n\t");
              if ($item['description']<>'') print("<td align=center>$description</a></td>\n</tr>\n");
    }
}

print("</table>\n");
//end

stdfoot();
hit_end();
?>
Reply With Quote
  #3  
Old 02-12-12, 03:11
firefly's Avatar
firefly firefly is offline
Senior Member
 
Join Date: Dec 2009
P2P
Posts: 74
Default
Quote:
Originally Posted by bill123 View Post
try this edit to your needs
@root call it shows.php

PHP Code:
<?
    ob_start("ob_gzhandler");

require "include/bittorrent.php";
dbconn(false);
loggedinorreturn();
hit_count();
stdhead(Episodes);


//define shows here
$showcount = 4;


$showname[1] = "Lost";
$showimg[1] ="pic/episodes/lost.jpg";

$showname[2] = "Prison Break";
$showimg[2] ="pic/episodes/prbreak.jpg";

$showname[3] = "Heroes";
$showimg[3] ="pic/episodes/heroes.jpg";

$showname[4] = "24";
$showimg[4] ="pic/episodes/24.jpg";
//end


function get_show($show,$exact="",$episode="") {

if ( !$show ) { return FALSE; }

if ( $fp = fopen("http://www.tvrage.com/quickinfo.php?show=".urlencode($show)."&ep=".urlencode($episode)."&exact=".urlencode($exact),"r") )
  {
  while ( !feof($fp))
    {
    $line = fgets($fp,1024);
    list ($sec,$val) = explode('@',$line,2);
    if ($sec == "Show Name" )
      {
      $ret[0] = $val;
      }
    elseif ( $sec == "Show URL" )
      {
      $ret[1] = $val;
      }
    elseif ( $sec == "Premiered" )
      {
      $ret[2] = $val;
      }
    elseif ($sec == "Country" )
      {
      $ret[7] = $val;
      }
    elseif ( $sec == "Status" )
      {
      $ret[8] = $val;
      }
    elseif ( $sec == "Classification" )
      {
      $ret[9] = $val;
      }

    elseif ( $sec == "Latest Episode" )
      {
      list ($ep,$title,$airdate) = explode('^',$val);
      $ret[3] = $ep.", \"".$title."\" aired on ".$airdate;
      }
    elseif ( $sec == "Next Episode" )
      {
      list ($ep,$title,$airdate) = explode('^',$val);
      $ret[4] = $ep.", \"".$title."\" airs on ".$airdate;
      }
    elseif ( $sec == "Episode Info" )
      {
      list ($ep,$title,$airdate) = explode('^',$val);
      $ret[5] = $ep.", \"".$title."\" aired on ".$airdate;
      }
    elseif ( $sec == "Episode URL" )
      {
      $ret[6] = $val;
      }
    }
  fclose($fp);
  if ( $ret[0] )
    {
    return $ret;
    }
  }
else
  {
  return FALSE;
  }
}

//search
?>
<br><br>
<table width=800 cellpadding=1>
<tr>
<td class=colhead align=center>Search</td>
<tr><td align=center>
<form action='http://www.tvrage.com/search.php' method='GET'>
Search For: <select name='sonly'><option value='0'>Shows & People</option><option value='1'>Shows</option><option value='2'>People</option></select>
<input type='text' name='search'>
<input type='submit' value='Search!'>
</form>
</td></tr>
</tr>
</table>
<br><br>
<?
//end of search

for($i = 1; $i < $showcount+1; $i++) { 
$show_infos1 = get_show("$showname[$i]","1");

//view shows
print("<table border=1 width=500 cellspacing=0 cellpadding=1>\n");
print("<tr><td class=colhead align=center>".$show_infos1[0]."</td>\n");
print("<tr><td class=colhead align=center><img src=$showimg[$i]></td></tr>\n");
print("<tr><td align=center><table border=0 width=745 cellspacing=0 cellpadding=2>\n");
print("<tr><td class=colhead align=center>Last Episode</td>\n");
print("<td>".$show_infos1[3]."</td></tr>\n");
print("<tr><td class=colhead align=center>Next Episode</td>\n");
print("<td>".$show_infos1[4]."</td></tr>\n");
print("<tr><td class=colhead align=center>Country</td>\n");
print("<td>".$show_infos1[7]."</td></tr>\n");
print("<tr><td class=colhead align=center>Status</td>\n");
print("<td>".$show_infos1[8]."</td></tr>\n");
print("<tr><td class=colhead align=center>Show Link</td>\n");
print("<td><a  class=altlink target=_blank href=".$show_infos1[1].">Link</a></td></tr>\n");
print("</tr></table>\n");
print("</tr></table><br><br>\n");
}

//end


//start rss read
define('MAGPIE_DIR', 'magpierss/');
define('MAGPIE_CACHE_DIR', 'cache/magpie_cache');
require_once(MAGPIE_DIR. 'rss_fetch.inc');


print("<table border=1 width=800 cellspacing=0 cellpadding=3>\n");
print("<tr>\n\t<td class=colhead align=center width=60>Time</td>\n\t<td class=colhead align=center width=220>Name</td>\n\t<td class=colhead align=center width=220>Description</td>\n</tr>\n");

$url = 'http://www.tvrage.com/myrss.php';
if ( $url ) {
    $rss = fetch_rss( $url );
    foreach ($rss->items as $item) {
        if ($item['description']=='') $chas = $item['title'];
        $href = $item['link'];
        $title = $item['title'];
        $title = str_replace(" - ","",$title);
              $description = $item['description']; 
              if ($item['description']<>'') print("<tr>\n\t<td align=center>$chas</td>\n\t<td align=center><a target =_blank href=$href>$title</a></td>\n\t");
              if ($item['description']<>'') print("<td align=center>$description</a></td>\n</tr>\n");
    }
}

print("</table>\n");
//end

stdfoot();
hit_end();
?>
This is all well and good but a better option will be to rather scrape content using CuRL & DOM.
__________________
Can install Gazelle

Last edited by firefly; 02-12-12 at 10:31.
Reply With Quote
  #4  
Old 02-12-12, 03:39
wMan's Avatar
wMan wMan is offline
Banned
 
Join Date: Feb 2008
P2P
Posts: 1,433
Default
hahahahaha

Bump:
Quote:
Originally Posted by firefly View Post
This is all well and good but a better option will be to rather scrape content using CuRL & DOM.
ive seen yours and its same as the above
Reply With Quote
  #5  
Old 16-02-13, 14:21
mat22's Avatar
mat22 mat22 is offline
Senior Member
 
Join Date: Jun 2009
Latvia
Posts: 119
Default
Tried this one but it doesn't return any information for me.
Reply With Quote
Reply

Tags
series or games or movies , tv

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT +2. The time now is 13:26. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2017, vBulletin Solutions Inc.