<? header('Content-type: text/xml'); ?>

<rss version="2.0">
<channel>
<title>Wiiff - Wii Friends Forever!</title>
<description>Wiiff Master List of Wii Friend Codes</description>
<link>http://www.wiiff.com/</link>
<copyright>(c) 2007 - 2009. Wiiff.</copyright>

<?
include("config.php");
global $conn;
$q = "select * from users WHERE status='0' ORDER BY username";
$result = mysql_query($q,$conn);
//$q="SELECT id,title,body,UNIX_TIMESTAMP(pubDate) AS pubDate
//FROM articles LIMIT 0,15 ORDER BY pubDate DESC";
$doGet=mysql_query($q);

while($result = mysql_fetch_array($doGet)){
?>
     <item>
        <title> <?=htmlentities(strip_tags($result['username'])); ?></title>
        <description> <?=htmlentities(strip_tags($result['friendcode'],'ENT_QUOTES'));?></description>
        <link>http://www.wiiff.com/<?=$result['username'];?>/</link>
     </item>  
<? } ?>  

</channel>
</rss>