burda sitemap.php dosyasına tıkladığınızda webmastertools size hatayı söyleyecektir. o hatayı yazarsanız yardımcı olabiliriz.
yada aşağıdaki kodları kendinize göre düzenleyebilirsiniz.
<?php
// db seç
$dbcnx = @mysql_connect("localhost","user","pass");
$dbselect = @mysql_select_db("db_adi");
mysql_query("SET NAMES 'utf8'");
mysql_query("SET CHARACTER SET utf8");
mysql_query("SET COLLATION_CONNECTION = 'utf8_general_ci'");
// Bilgileri çek.
$query = "SELECT program FROM program_adi";
$result = mysql_query($query) or die('Error: '.mysql_error());
header("content-type:text/xml;charset=utf-8");
$mapdata .= '<?xml version="1.0" encoding="utf-8"?>' . "\n";
$mapdata .= '<urlset xmlns="http://www.google.com/schemas/sitemap/0.84">' . "\n";
while($row = @mysql_fetch_array($result)) {
$adi = $row['tag'];
$etiket = htmlspecialchars(stripslashes(trim($etiket)), ENT_QUOTES);
$mapdata .= ' <url>' . "\n";
$mapdata .= ' <loc>http://siten.com/'.$adi.'/</loc>' . "\r\n";
$mapdata .= ' <priority>1.0</priority>' . "\r\n";
$mapdata .= ' <changefreq>weekly</changefreq>' . "\r\n";
$mapdata .= ' </url>' . "\r\n";
}
$mapdata .= '</urlset>' . "\r\n";
header('Content-type: text/xml');
header('Content-disposition: inline; filename=sitemap.xml');
echo $mapdata;
?>