Sorry

This feed does not validate.

Source: http://www.saabnet.ee/saabnet.xml

  1. <?php
  2. header ("Content-type: text/xml; charset=windows-1250"); // Output file as XML
  3. echo ("<?xml version=\"1.0\" encoding=\"windows-1250\"?>\n"); // The XML declaration
  4. include ('/home/www/conf/conrw.php');
  5. ?>
  6.  
  7. <rdf:RDF xmlns:dc="http://purl.org/dc/elements/1.1/"
  8. xmlns:h="http://www.w3.org/1999/xhtml"
  9. xmlns:hr="http://www.w3.org/2000/08/w3c-synd/#"
  10. xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  11. xmlns="http://purl.org/rss/1.0/">
  12.  
  13. <channel rdf:about="http://www.example.com">
  14. <title>saabnet.ee</title>
  15. <description>Eesti Saabikute vestlusring</description>
  16. <link>http://www.saabnet.ee</link>
  17. <items>
  18.  <rdf:Seq>
  19. <?php
  20. #   $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);
  21.   $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);  
  22.  
  23. //SELECT p.pid FROM xmb_posts p ORDER BY p.pid DESC LIMIT
  24. //request list of newest 3 items in feed from db (RSS etiquette suggests MAX of 1
  25. foreach ($rs as $a)
  26. echo ("<rdf:li rdf:resource=\"http://www.saabnet.ee/foorum/viewthread.php?goto=lastpost&amp;tid=$a[pid]\" />");
  27. //Display this list of items in proper format. this is used by RSS readers as a kind of index.
  28. //The resource should be a URL and unique
  29. unset($rs); //destroys variables so the var names can be reused
  30. ?>
  31.  </rdf:Seq>
  32. </items>
  33.    
  34. </channel>
  35.  
  36. <?php
  37. //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")
  38.    $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);
  39. # $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);
  40.    
  41. //request all data for newest 3 items in feed from db
  42. foreach ($rs as $row)
  43.  
  44. //loops through results of SELECT displaying each items data
  45. {
  46.    echo (" <item rdf:about=\"http://www.saabnet.ee/foorum/viewthread.php?goto=lastpost&amp;tid=$row[tid]\">
  47.    <link>http://www.saabnet.ee/foorum/viewthread.php?goto=lastpost&amp;tid=$row[tid]</link>
  48.    <title>");
  49.    echo $row[author]." - ".utf8_encode($row[subject]);
  50.    echo ("</title>  
  51.    <description>");
  52.    
  53.    echo htmlspecialchars($row[kp].': '.utf8_encode($row[message]));
  54.    // handy php function makes sure the XML is well formed by changing & " ' < > into html entities
  55.    //www.php.net/htmlspecialchars
  56.    
  57.    echo ("</description>
  58.    <dc:date>");
  59.    
  60.    echo $row[kp];
  61.    
  62.    echo ("</dc:date>
  63.    
  64.    </item>\n\n");
  65. }
  66.  
  67. unset($rs,$row); //destroys variables so the var names can be reused
  68.  
  69. ?>
  70. </rdf:RDF>
  71.  
Copyright © 2002-9 Sam Ruby, Mark Pilgrim, Joseph Walton, and Phil Ringnalda