<?php 
echo "<" . "?xml version=\"1.0\" encoding=\"iso-8859-1\"?" . ">\n"; 
?>

<urlset
  xmlns="http://www.google.com/schemas/sitemap/0.84"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.google.com/schemas/sitemap/0.84
                      http://www.google.com/schemas/sitemap/0.84/sitemap.xsd">
 <url>
 <loc>http://www.vrij-spel.com</loc>
 <lastmod><?=date ("Y-m-d");?></lastmod>
 <changefreq>always</changefreq>
 <priority>1.0</priority>
</url>

<?
include('config.php');
mysql_connect($host,$gebruikersnaam,$wachtwoord); 
mysql_select_db($db);
$sql = "SELECT * FROM games ORDER BY id DESC"; 
$query = mysql_query($sql);
while ($show = mysql_fetch_object($query)){
?>

<url>
 <loc>http://www.vrij-spel.com/spellen/<?=$show->id;?></loc>
 <lastmod><?=date ("Y-m-d");?></lastmod>
 <changefreq>always</changefreq>
 <priority>0.8</priority>
</url>

<? } ?> 

</urlset>