100 % dynamic sitemap generator {php code}
php Code:
mysql_connect("localhost", "DataBase-UserName", "database-password") or die("Could not connect: " . mysql_error()); mysql_select_db("DataBase-Name");//////////// < ?> $sql = "SELECT * FROM thread"; $result = mysql_query($sql) or die(mysql_error()); header('Content-Type: application/xml'); echo ''."\n"; echo "\" 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\">"; while($row = mysql_fetch_assoc($result)) { ?>} ?> http://www.yoursite.com/?t= echo $row['threadid']; ?> 2008-03-23T13:36:17+00:00 0.50 weekly
this code will generate XML sitemap directly from the database you just need to adjust the code according to your database and php script
php Code:
$sql = "SELECT * FROM thread";
thread is the mysql taple
php Code:
echo $row['threadid']; ?>
threadid is the item id
0 التعليقات
Post a Comment