This feed does not validate.
echo ("<?xml version=\"1.0\" encoding=\"windows-1250\"?>\n"); // The XML dec ...
^
<?php
header ("Content-type: text/xml; charset=windows-1250"); // Output file as XML
echo ("<?xml version=\"1.0\" encoding=\"windows-1250\"?>\n"); // The XML declaration
include ('/home/www/conf/conrw.php');
?>
<rdf:RDF xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:h="http://www.w3.org/1999/xhtml"
xmlns:hr="http://www.w3.org/2000/08/w3c-synd/#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://purl.org/rss/1.0/">
<channel rdf:about="http://www.example.com">
<title>saabnet.ee</title>
<description>Eesti Saabikute vestlusring</description>
<link>http://www.saabnet.ee</link>
<items>
<rdf:Seq>
<?php
# $rs=$ib->getAll("SELECT p.pid, p.tid, f.subject, p.author, FROM_UNIXTIME(p.dateline,'%d.%m.%Y %H:%i')AS kp FROM xmb_posts p, xmb_threads f WHERE f.tid=p.tid ORDER BY p.pid DESC LIMIT 10",$fetchmode = 2);
$rs=$ib->getAll("SELECT p.pid, p.tid, f.subject, p.author, FROM_UNIXTIME(p.dateline,'%d.%m.%Y %H:%i')AS kp,FROM xmb_posts p, xmb_threads f WHERE p.fid!=39 and p.fid!=41 and p.fid!=59 and p.fid!=60 and p.fid!=61 and p.fid!=62 and f.tid=p.tid ORDER BY p.pid DESC LIMIT 10",$fetchmode = 2);
//SELECT p.pid FROM xmb_posts p ORDER BY p.pid DESC LIMIT
//request list of newest 3 items in feed from db (RSS etiquette suggests MAX of 1
foreach ($rs as $a)
echo ("<rdf:li rdf:resource=\"http://www.saabnet.ee/foorum/viewthread.php?goto=lastpost&tid=$a[pid]\" />");
//Display this list of items in proper format. this is used by RSS readers as a kind of index.
//The resource should be a URL and unique
unset($rs); //destroys variables so the var names can be reused
?>
</rdf:Seq>
</items>
</channel>
<?php
//SELECT p.pid, p.tid, f.subject, p.author, p.message, FROM_UNIXTIME(p.dateline,'%d.%m.%Y %H:%i')AS kp FROM xmb_posts p, xmb_threads f WHERE f.tid=p.tid ORDER BY p.pid DESC LIMIT 10")
$rs=$ib->getAll("SELECT p.pid, p.tid, f.subject, p.message, p.author, FROM_UNIXTIME(p.dateline,'%d.%m.%y %H:%i')AS kp FROM xmb_posts p, xmb_threads f WHERE p.fid!=39 and p.fid!=41 and p.fid!=59 and p.fid!=60 and p.fid!=61 and p.fid!=62 and f.tid=p.tid ORDER BY p.pid DESC LIMIT 10",$fetchmode = 2);
# $rs=$ib->getAll("SELECT p.pid, p.tid, f.subject, p.author, FROM_UNIXTIME(p.dateline,'%d.%m.%Y %H:%i')AS kp,FROM xmb_posts p, xmb_threads f WHERE p.fid!=39 and f.tid=p.tid ORDER BY p.pid DESC LIMIT 10",$fetchmode = 2);
//request all data for newest 3 items in feed from db
foreach ($rs as $row)
//loops through results of SELECT displaying each items data
{
echo (" <item rdf:about=\"http://www.saabnet.ee/foorum/viewthread.php?goto=lastpost&tid=$row[tid]\">
<link>http://www.saabnet.ee/foorum/viewthread.php?goto=lastpost&tid=$row[tid]</link>
<title>");
echo $row[author]." - ".utf8_encode($row[subject]);
echo ("</title>
<description>");
echo htmlspecialchars($row[kp].': '.utf8_encode($row[message]));
// handy php function makes sure the XML is well formed by changing & " ' < > into html entities
//www.php.net/htmlspecialchars
echo ("</description>
<dc:date>");
echo $row[kp];
echo ("</dc:date>
</item>\n\n");
}
unset($rs,$row); //destroys variables so the var names can be reused
?>
</rdf:RDF>