buyur hocam hayrını gör
$sqlsitemap="select * from konular ORDER BY id DESC";
$sorgusitemap=mysql_query($sqlsitemap,$baglanti);
While($sitemapkonu=mysql_fetch_array($sorgusitemap))
{
$sitemapurl .= '<url>
<loc>http://video.sencer.info/'.$sitemapkonu[baslikurl].'.html</loc>
<lastmod>'.$sitemapkonu[tarih].'</lastmod>
<priority>0.7</priority>
</url>';
}
$xml .= '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">';
$xml .= $sitemapurl;
$xml .= '</urlset>';
$dosya= fopen ("../sitemap.xml","w") ;
if(!$dosya) {
echo "Maalesef kayıt başarısız sencere sormam lazım";
}
else
{
echo "sitemap başarılı bir şekilde güncellenmiştir.";
}
fwrite ($dosya,$xml);
fclose ("$dosya");