<? header('Content-type: text/xml'); ?>
<?php echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"; ?>
<rss version="2.0">

<channel>
<title>PSP Desktops - Most Recent News</title>
<link>http://www.pspdesktops.com</link>
<description>The latest blog posts from PSP Desktops</description>

<?php

include("../_functions.php");

$sql = 'SELECT * FROM `tblnews` ORDER BY datetime DESC LIMIT 10';
$query = mysql_query($sql);


while ($row = mysql_fetch_array($query)) {

$id = $row['IDnews'];
$title = $row['title'];
$story = $row['story'];
$submitter = $row['author'];
$datetime = $row['datetime'];


$link = "http://www.pspdesktops.com/news.php?vstory=".$id."";

echo "<item>";
echo "<title>$title</title>";
echo "<link>$link</link>";
echo "<description><![CDATA[$story]]></description>";
echo "<guid isPermaLink=\"true\">$link</guid>";
echo "<pubDate>$datetime</pubDate>";
echo "</item>";
echo " ";


}
?>

</channel>
</rss>