<?
include("dbs.php");
function seo_link($link) {
$link=eregi_replace(" ","-", $link);
$link=str_replace('ı', 'i', $link);
$link=str_replace('İ', 'I', $link);
$link=str_replace('ğ', 'g', $link);
$link=str_replace('Ğ', 'G', $link);
$link=str_replace('ü', 'u', $link);
$link=str_replace('Ü', 'U', $link);
$link=str_replace('ş', 's', $link);
$link=str_replace('Ş', 'S', $link);
$link=str_replace('ö', 'o', $link);
$link=str_replace('Ö', 'O', $link);
$link=str_replace('ç', 'c', $link);
$link=str_replace('Ç', 'C', $link);
$link = str_replace ("'","",$link);
$link = str_replace ("/","",$link);
$link = str_replace (":","",$link);
$link = str_replace ("\"","",$link);
$link = str_replace (" ","-",$link);
$link = str_replace ("-","-",$link);
$link = str_replace ("--","-",$link);
$link = str_replace ("|","",$link);
$link = str_replace ("ç","c",$link);
$link = str_replace ("ş","s",$link);
$link = str_replace ("’","",$link);
$link=ereg_replace("[^0-9A-Za-z-]","", $link);
return $link;
}
print_r('<?xml version="1.0" encoding="UTF-8"?>
<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">');
$cek=mysql_query("Select * from videolar order by id desc");
while($veri=mysql_fetch_array($cek))
{
?>
<url>
<loc>http://www.siteadı.com/<?=seo_link($veri[adi_s]);?>.html</loc>
<priority>1.0</priority>
<changefreq>daily</changefreq>
</url>
<?
echo "\n";
}
?>
</urlset>