RSS FEED fejlfinding
hvad er der galt for altid fejlThe XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
--------------------------------------------------------------------------------
A semi colon character was expected. Error processing resource 'http://62.212.84.226/rssdd.xml'. Line 28, Position 59
<link>.....
/* 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<channel>\n" .
"<title>XxX</title>\n<description>0-week torrents</description>\n<link>$DEFAULTBASEURL/</link>\n";
@fwrite($fd1, $s);
@fwrite($fd2, $s);
$r = mysql_query("SELECT id,name,descr,filename,category,owner FROM torrents ORDER BY added DESC LIMIT 15") or sqlerr(__FILE__, __LINE__);
while ($a = mysql_fetch_assoc($r))
{
$userres = mysql_query("SELECT username FROM users WHERE id = ".$a['owner']."") or die(mysql_error());
$user = mysql_fetch_assoc($userres);
$cat = $cats[$a["category"]];
$s = "<item>\n<title>" . htmlspecialchars($a["name"] . " (".htmlspecialchars($cat).")") ." by " . htmlspecialchars($user['username'])
. "</title>\n" .
"<description>" . htmlspecialchars($a["descr"]) . "</description>\n";
@fwrite($fd1, $s);
@fwrite($fd2, $s);
@fwrite($fd1, "<link>$DEFAULTBASEURL/details.php?id=$a[id]&hit=1</link>\n</item>\n");
$filename = htmlspecialchars($a["filename"]);
@fwrite($fd2, "<link>$DEFAULTBASEURL/download.php?id=$a[id]&name=$filename</link>\n</item>\n");
}
$s = "</channel>\n</rss>\n";
@fwrite($fd1, $s);
@fwrite($fd2, $s);
@fclose($fd1);
@fclose($fd2);
}