Lo uso sul mio sito, funziona bene e puoi indirizzare gli strumenti per i webmaster di Google a "this_file.php" e funziona a meraviglia!
<?php header("Content-type: text/xml"); echo'<?xml version=\'1.0\' encoding=\'UTF-8\'?>'; echo' <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">'; include '../include.php'; $sql = mysql_query("select blah from bleh"); while ($string = mysql_fetch_array($sql)){?> <url> <loc>http://www.domain.com/dir/<?echo $string['value'];?>/index.php</loc> <changefreq>weekly</changefreq> </url> <?php } ?> </urlset>