<?php
    include("ayar.php");
    //ayar dosyası oluşturun ve include edin
    header('Content-type: text/xml');
    echo "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n";
    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\">";
    $cikti .= "\n<url>\n<loc>http://www.codeboot.com</loc>\n<changefreq>daily</changefreq>\n<priority>1.00</priority>\n</url>";
    //sqlden alınmayan statik sayfalar el ile girilir
    $cikti .= "\n<url>\n<loc>http://www.codeboot.com/archive</loc>\n<changefreq>daily</changefreq>\n<priority>1.00</priority>\n</url>";
    $cikti .= "\n<url>\n<loc>http://www.codeboot.com/random</loc>\n<changefreq>daily</changefreq>\n<priority>1.00</priority>\n</url>";
    $cikti .= "\n<url>\n<loc>http://www.codeboot.com/contact</loc>\n<changefreq>daily</changefreq>\n<priority>0.80</priority>\n</url>";
//sql sorgunuzu düzenleyin limiti belirtin
$result=mysql_query("select * from tablom order by id DESC LIMIT 150");
while ( $veri = mysql_fetch_array($result))
{
$ID=$veri['video'];
$baslik=$veri['baslik'];
    $cikti .= "\n<url>\n<loc>http://www.codeboot.com/watch.php?video=$ID</loc>\n<changefreq>daily</changefreq>\n<priority>0.80</priority>\n</url>";
    };

    echo $cikti ."\n</urlset>";

?>