LaCReMeL hocam sitemap.xml olarak kaydettiğimi sitemap.php yaptım aşağıdaki hatayı verdi.
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/videoara/public_html/sitemap.php on line 8
kod bu
<?php
$baglanti = mysql_connect('localhost','xxxx','xxxx');
$veritabani = mysql_select_db('xxxxx, $baglanti);
$date = date('Y-m-d');
$sorgu = mysql_query("SELECT * FROM videolar ORDER BY id desc");
echo "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n";
echo "<urlset 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\" xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">";
while($sonuc=mysql_fetch_assoc($sorgu)){
echo " <url>
<loc>http://www.videoara.org/".$sonuc[basliktr]."-".$sonuc[videoid]."</loc>
<lastmod>$date</lastmod>
<changefreq>daily</changefreq>
<priority>0.5</priority>
</url>\n";
}
echo '</urlset>';
?>