<? header('Content-type: text/xml'); ?>
<?php 
include('../Connections/threemon.php');

mysql_select_db($database_threemon, $threemon);
 $calcio_query=" SELECT title,description,id,article,DATE_FORMAT(date,'%e%c') as pubdate, DATE_FORMAT(date,'%a, %m %M') as rssdate from calcio  ORDER by id DESC LIMIT 5";
 $calcio=mysql_query($calcio_query,$threemon) or die(mysql_error());
 $row_calcio=mysql_fetch_assoc($calcio);

?>
 <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
 <channel>
  <title>Italian Football News</title> 
  <link>http://www.threemonkeysonline.com/italian_football/</link> 
  <description>Italian Football news, articles, and features in english, from Three Monkeys Online's Italian team</description> 
  <language>en</language> 
  <webMaster>information@threemonkeysonline.com</webMaster> 
  <atom:link href="http://www.threemonkeysonline.com/rss_feeds/italian_football.xml" rel="self" type="application/rss+xml" />
  <?php do {?>
  <item>
  <title><?php echo $row_calcio['title'];?> </title>
  <description><?php echo $row_calcio['description'];?></description>
  <guid>http://www.threemonkeysonline.com/italian_football/<?php echo $row_calcio['article'];?>_<?php echo $row_calcio['pubdate'];?>.html</guid>
  <pubDate><?php echo $row_calcio['rssdate'];?></pubDate>
  </item> 
  <?php } while ($row_calcio=mysql_fetch_assoc($calcio));?>
</channel>
</rss>
