XML sites map are important for google seo
but a lot of old php scripts does not support xml maps to be created from the php script itself so this code will work with any php script that get the data from a mysql database
[PHP]<?php
mysql_connect("localhost", "DataBase-UserName", "database-password") or
die("Could not connect: " . mysql_error());
mysql_select_db("DataBase-Name");//////////// <
?>
<?php
$sql = "SELECT * FROM thread";
$result = mysql_query($sql) or die(mysql_error());
header('Content-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: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)) {
?>
<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>
[/PHP]
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] $sql = "SELECT * FROM thread";[/PHP] thread is the mysql taple
[PHP]<?php echo $row['threadid']; ?>[/PHP] threadid is the item id
Gulf Greats: CANADIANS TRIUMPH IN DUBAI
SDI Canada, designs, constructs and install suites for diagnostic imaging equipment such as MRIs, CT scanners, X-ray machines and PET scanners.
Work and study in Canada
Work and study in canada apply for january intake now www.professionalcolleges.org