<?php
  /* STEP 1: LOAD RECORDS - Copy this PHP code block near the TOP of your page */
  require_once "/home/fraction/public_html/cmsAdmin/lib/viewer_functions.php";

  list($newsRecords, $newsMetaData) = getRecords(array(
    'tableName'   => 'news',
    'perPage'     => '10',
  ));

header("Content-type: application/rss+xml; charset=utf-8");
?>
<rss version="2.0"> 
  <channel> 
    <title>Fraction Facts</title> 
      <link>http://www.fractionfacts.com.au</link> 
      <description>Description goes here.</description> 
      <pubDate><?php echo date('r'); ?></pubDate> 
      <language>en-us</language>

<?php foreach ($newsRecords  as $record): ?> 
        <item> 
          <title><?php echo $record['title'] ?></title> 
          <link><?php echo $record['_link'] ?></link> 
          <pubDate><?php echo date("r", strtotime($record['date'])) ?></pubDate> 
          <guid isPermaLink="true"><?php echo $record['_link'] ?></guid> 
        </item> 
<?php endforeach ?> 
 
  </channel> 
</rss>
