1112394460 0 http://torrentdb.yi.org/ IMPORTANT UPDATE: address changed to: torrentdb.yi.org */ require("xmlspecialchars.php"); // php errors mess up our xml output, let's try to handle them cleanly error_reporting(0); $search=$_GET['search']; if (!isset($_GET['search'])) $search=$_GET['SEARCH']; $newer=$_GET['newer']; $day=$_GET['day']; // build query - search or list if ($search) { // TODO: pages for search results? // inform users about limit? (needed to avoid sending the whole db) $search=ereg_replace("[ _%\"]","%",$search); //$search=ereg_replace("'","\'",$search); $qry="select date,size,url,name,date,tracker from torrentdb where name like '%" . $search . "%' or url like '%" . $search . "%' order by -date limit 200"; $selection="searched for: ".htmlentities($search) . " (200 results max)"; } else if ($newer) { if ("hello".$newer != "hello".($newer+1-1)) $newer=9999999999; $qry="select size,url,name,date,tracker from torrentdb where ctime>" . (0+$newer) . " order by -ctime"; $selection="torrents newer than ".date("r",$newer) ." by time of indexing"; $next="?newer=" . time(); $prev="?"; } else if ($day != ""){ // calculate start and end time $from=strtotime((-$day)." day 00:00:00"); $to =strtotime((-$day+1)." day 00:00:00"); $qry="select size,url,name,date,tracker from torrentdb where date>" . $from . " and date<" . $to . " order by -ctime"; $selection="torrents for ". date("l, jS F Y",strtotime((-$day)." days 00:00:00")); $prev="?day=" . ($day+1); if ($day>0) { $next="?day=" . ($day-1); } else { $next="?newer=" . time(); } } else { $to =strtotime("now"); $from=strtotime((-1)." day"); $qry="select size,url,name,date,tracker from torrentdb where date>" . $from . " and date<" . $to . " order by -ctime"; $selection="torrents for the last 24 Hours"; $prev="?day=1"; $next="?newer=" . time(); } $server = mysql_connect("newone","torrentdb","l33t"); mysql_select_db("torrentdb",$server); header("Content-type: text/xml"); print " "; print " "; ?> torrentdb reigning over torrents visit #torrentdb on irc.rizon.net for discussion
also try our rss feed!
not complete enough? submit more sites to index!
want to see ONLY newly added torrents? (keep clicking the arrow to update) */?>
http://torrentdb.yi.org/
*/?>
just report them in the irc channel...
*/?>
query failed: name));?>*/?> url));?>*/?> date;?> size;?> name);?> url));?> tracker);?> dead 13 37 1087168072 */?>