that's my php code;
//Encode ANSI
function donustur($str){
$eski = array('Ç', 'Ş', 'Ğ', 'Ü', 'İ', 'Ö', 'ç', 'ş', 'ğ', 'ü', 'ö', 'ı', ' ','&');
$yeni = array('c', 's', 'g', 'u', 'i', 'o', 'c', 's', 'g', 'u', 'o', 'i', '-','&');
return str_replace($eski,$yeni,$str);
}
header('Content-type: text/xml');
echo "<?xml version=\"1.0\" encoding=\"ISO8859-9\" ?>
";
echo "<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\">";
echo "<url>
<loc>http://www.sitem.com/</loc>
<changefreq>daily</changefreq>
</url>";
$d = "\t<changefreq>daily</changefreq>
";
$kategoriCek = mysql_query("SELECT * FROM kategoriler");
while($kat = mysql_fetch_array($kategoriCek)){
echo "<url>
";
echo "\t<loc>http://www.sitem.com/".$kat['id']."-".donustur(strtolower($kat['kategoriadi']))."-kategori.html</loc>
";
echo $d;
echo "</url>
";
}
echo "</urlset>
";
output;
<loc>http://www.sitem.com/93-??-guvenl?k-kategori.html</loc>
I want should be like that;
<loc>http://www.sitem.com/93-is-guvenlik-kategori.html</loc>
UTF-8 and UTF-8 not BOM or encoding="ISO8859-9", encoding="UTF-8" doesn't work it.
How we do solve?
Thank you for your interest. Good works..