<? header('Content-type: text/xml'); ?>
<?php 
include('../Connections/threemon.php');

$author=str_replace("_"," ",$HTTP_GET_VARS['author']);
$authortitle=$HTTP_GET_VARS['author'];

mysql_select_db($database_threemon, $threemon);
 $authorss_query=" SELECT title,description,id,author,article,category from articles WHERE author='$author'  ORDER by id DESC LIMIT 5";
 $authorss=mysql_query($authorss_query,$threemon) or die(mysql_error());
 $row_authorss=mysql_fetch_assoc($authorss);
 
 
?>
 <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
 <channel>
  <title>Work by <?php echo $author;?> published in Three Monkeys Online magazine</title> 
  <link>http://www.threemonkeysonline.com/authors/<?php echo $authortitle;?>.html</link> 
  <description>Newsfeed for the latest articles and reviews by <?php echo $author;?></description> 
  <language>en</language> 
  <webMaster>information@threemonkeysonline.com</webMaster> 
  <atom:link href="http://www.threemonkeysonline.com/rss_feeds/authors/<?php echo $authortitle;?>.xml" rel="self" type="application/rss+xml" />
  <?php do {?>
  <item>
  <title><?php echo strip_tags($row_authorss['title']);?> </title>
  <description><?php echo strip_tags($row_authorss['description']);?></description>
  <guid>http://www.threemonkeysonline.com/als/<?php echo $row_authorss['article'];?>.html</guid>
  </item> 
  <?php } while ($row_authorss=mysql_fetch_assoc($authorss));?>
</channel>
</rss>
