Advertisement
ayqo

Untitled

Jun 15th, 2012
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.01 KB | None | 0 0
  1. <?php  
  2. include('ayar.php');
  3.  
  4. header('Content-type: text/xml');
  5.  
  6. $cikti.="<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<urlset 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\" xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\"\n
  7.     <url>\n
  8.         <loc>$siteAnasayfa</loc>\n
  9.         <changefreq>daily</changefreq>\n
  10.         <priority>1.0</priority>\n
  11.     </url>\n";
  12.  
  13. $sql="SELECT * FROM urun";
  14. $sorgu=mysql_query("$sql");
  15.  
  16. while ($sonuc=mysql_fetch_array($sorgu)){
  17. $cikti .= "\n
  18.     <url>\n
  19.         <loc>$site/$sonuc[adres].html</loc>\n
  20.         <changefreq>daily</changefreq>\n
  21.         <priority>0.8</priority>\n
  22.     </url>\n";
  23. }
  24.  
  25. $sql="SELECT * FROM kat";
  26. $sorgu=mysql_query("$sql");
  27.  
  28. while ($sonuc=mysql_fetch_array($sorgu)){
  29. $cikti .= "\n
  30.     <url>\n
  31.         <loc>$site/$sonuc[adres].html</loc>\n
  32.         <changefreq>daily</changefreq>\n
  33.         <priority>0.8</priority>\n
  34.     </url>\n";
  35. }
  36.  
  37.  
  38. $cikti.="</urlset>";
  39.  
  40. echo $cikti;
  41. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement