Şöyle kullan;
<?php
include 'ayar.php';
header("content-type: text/xml");
echo '<?xml version="1.0" encoding="UTF-8"?>';
?>
<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/09/sitemap.xsd">
<?php
$sonuc = mysql_query("select id,ad from z_inndir WHERE (durum='a') order by id desc");
while($satir = mysql_fetch_assoc($sonuc)){
?><url>
<loc>http://www.sitem.com/<?php echo dosya($satir[ad]).'_'.$satir[id].'.htm'; ?></loc>
<priority>0.5</priority>
<changefreq>daily</changefreq>
</url>
<?php
}
?>
</urlset>Google webmaster tools site haritaları bölümünden de url yi ekle. Sitenden link vermene gerek yok.