أارشفه سريعه للموقع من خلال قاعده البيانات super fast xml sitemap generator
,
السلام عليكم
خلال التجول في الشبكه وجدت هذا المقال
super fast xml sitemap generator from data****
والذي يتحدث ها امكانيه عمل sitemap
للموقع من خلال قاعده البيانات
كود PHP:
<?php
mysql_connect("localhost", "Data****-UserName", "data****-password") or
die("Could not connect: " . mysql_error());
mysql_select_db("Data****-Name");//////////// <
?>
<?php
$sql = "SELECT * FROM thread";
$result = mysql_query($sql) or die(mysql_error());
header('(anti-spam-*******-type:) application/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:schema********="http://www.google.com/schemas/sitemap/0.84 http://www.google.com/schemas/sitemap/0.84/sitemap.xsd">";
while($row = mysql_fetch_assoc($result)) {
?>
<url>
<loc>http://www.yoursite.com/?t=<?php echo $row['threadid']; ?></loc>
<lastmod>2008-03-23T13:36:17+00:00</lastmod>
<priority>0.50</priority>
<changefreq>weekly</changefreq>
</url>
<?php } ?>
</urlset>