1- PHP tagını böyle başlat
<?php ob_start();header('Content-Type: text/xml'); //PHP dosyasının XML dosyası olarak algılanmasını sağlıyoruz.
2- Bunu sil
<?php header('Content-type: application/xml; ',true); ?>
3- bunu sil
<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">
4- 3. madde yerine bunu ekle
<?
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">
'; ?>
5- $sql = "SELECT * FROM oc_product_description";
üstüne mysql_query("SET NAMES UTF8"); bunu ekle (karakter setin UTf-8 ise)