xyz commented on a Page, RSS Feed  -  Jul 08, 2005

A little food for thought..

<?php
/ RSS feeds /

if (($fd1 = @fopen(\"rss.xml\", \"w\")) && ($fd2 = fopen(\"rssdd.xml\", \"w\")))
{
$cats = \"\";
$res = mysql_query(\"SELECT id, name FROM categories\");
while ($arr = mysql_fetch_assoc($res))
$cats[$arr[\"id\"]] = $arr[\"name\"];
$s = \"<?xml version=\\"1.0\\" encoding=\\"iso-8859-1\\" ?>\n<rss version=\\"0.91\\">\n\n\" .
\"Torrenfilez\ntorrents\n$DEFAULTBASEURL/\n\";
@fwrite($fd1, $s);
@fwrite($fd2, $s);
$r = mysql_query(\"SELECT id,name,descr,filename,category FROM torrents ORDER BY added DESC LIMIT 15\") or sqlerr(FILE, LINE);
while ($a = mysql_fetch_assoc($r))
{
$cat = $cats[$a[\"category\"]];
$s = \"\n\" . htmlspecialchars($a[\"name\"] . \" ($cat)\") . \"\n\" .
\"\" . htmlspecialchars($a[\"descr\"]) . \"\n\";
@fwrite($fd1, $s);
@fwrite($fd2, $s);
@fwrite($fd1, \"$DEFAULTBASEURL/details.php?id=$a[id]&hit=1\n\n\");
$filename = htmlspecialchars($a[\"filename\"]);
@fwrite($fd2, \"$DEFAULTBASEURL/download/$a[id]/$filename\n\n\");
}
$s = \"\n\n\";
@fwrite($fd1, $s);
@fwrite($fd2, $s);
@fclose($fd1);
@fclose($fd2);
}
?>

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.