File: /home/httpd/html/baretube.com/sitemapStaticPages.php
<?
session_start();
header('Content-type: text/xml; charset=UTF-8');
include('admin/db.php');
echo '<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" 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">
';
//general pages
$urlsArray = array('','channels.php','login.php','signup.php');
foreach($urlsArray as $i) {
?>
<url>
<loc><? echo $basehttp; ?>/<? echo $i; ?></loc>
<changefreq>hourly</changefreq>
<priority>1.00</priority>
</url>
<?
}
//top rated
$result = mysql_query("SELECT * FROM static ORDER BY record_num ASC") or die(mysql_error());
while($row = mysql_fetch_array($result)) {
?>
<url>
<loc><? echo $basehttp; ?>/static/<? echo $row[filename]; ?></loc>
<changefreq>hourly</changefreq>
<priority>0.70</priority>
</url>
<?
}
echo '</urlset>';
?>