Sorry

This feed does not validate.

In addition, interoperability with the widest range of feed readers could be improved by implementing the following recommendation.

Source: http://jawsrus.bravejournal.com/feed.rss

  1. <?php // $Id: index.php,v 1.2 2004/02/04 01:35:19 jerrett Exp $
  2. header("Content-type: text/xml");
  3. require_once(".get_userinfo.php");
  4.  
  5. if (file_exists($data_path.'feed.rss'))
  6. {
  7. readfile($data_path.'feed.rss');
  8. }
  9. else
  10. {
  11. ob_start();
  12. echo '<?xml version="1.0" encoding="UTF-8"?>'; ?>
  13.  
  14. <rss version="2.0">
  15. <channel>
  16. <title><![CDATA[<?= strip_tags($App->Client->GetOption('title')); ?>]]></title>
  17. <link>http://<?= $_SERVER["HTTP_HOST"]; ?></link>
  18. <ttl>30</ttl>
  19. <description><![CDATA[<?= strip_tags($App->Client->GetOption('description')); ?>]]></description>
  20. <generator>Bravenet Web Journal</generator>
  21. <?
  22.  
  23. // get entries from db
  24. $sql = "select *, UNIX_TIMESTAMP(posted) as utimestamp from journal_entries where usernum = '".$App->Client->GetValue('usernum')."' order by posted desc limit 0, 10";
  25. $res = $App->DB->Select($sql);
  26.  
  27. // build array of journal entries & their data
  28. while ($row = $App->DB->FArray($res,MYSQL_ASSOC))
  29. {
  30.  
  31. ?>
  32. <item>
  33. <title><![CDATA[<?=  $App->Filter->Run($row['title'],array('striphtml' => true)); ?>]]></title>
  34. <link>http://<?= $_SERVER["HTTP_HOST"]; ?>/entry/<?= $row['id']; ?>/</link>
  35. <description><![CDATA[<?= $App->Filter->Run($row['content'],array('striphtml' => true, 'truncate' => array('length' => 180, 'endchar' => '...'))); ?>]]></description>
  36. <pubDate><?=  gmdate('r',($row['utimestamp']+($App->Client->userinfo['tzone']*3600))); ?></pubDate>
  37. </item>
  38. <?
  39. $entries[$row['id']] = array
  40. (
  41. 'date' => $row['formated_date'],
  42. 'time' => $row['formated_time'].$time_extra,
  43. 'title' => $row['title'],
  44. 'content' => nl2br($row['content']),
  45. 'num_comments' => number_format($row['num_comments']),
  46. 'response1' => $row['response1'],
  47. 'response2' => $row['response2'],
  48. 'response3' => $row['response3'],
  49. 'response4' => $row['response4'],
  50. 'comment_privacy' => $row['comment_privacy'],
  51. 'showItems' => (($row['response1'] && $App->Client->GetOption('custom1')) || ($row['response2'] && $App->Client->GetOption('custom2')) || ($row['response3'] && $App->Client->GetOption('custom3')) || ($row['response4'] && $App->Client->GetOption('custom4'))) ? true : false
  52. );
  53. }
  54. ?>
  55. </channel>
  56. </rss>
  57. <?
  58. $rss = ob_get_contents();
  59. ob_clean();
  60. // Journal Object
  61. $journalObj = $App->CreateObject('BN_Journal');
  62. $journalObj->updateCachedFeed($rss);
  63. #FIXME Remove from file
  64. /*$out = fopen($data_path.'feed.rss','w+');
  65. fwrite($out,$rss);
  66. fclose($out);*/
  67. echo $rss;
  68. }
  69. ?>
Copyright © 2002-9 Sam Ruby, Mark Pilgrim, Joseph Walton, and Phil Ringnalda