Shouldnt it be
Code:
<?php
include("include/config.php");
$VID=$_REQUEST[VID];
$query = "select * from video where type='public' and active='1' and approve='1'";
$db=mysql_connect ($db_host,$db_user,$db_pass) or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db ($db_name);
$num_rows = mysql_num_rows(mysql_query("select * from video WHERE AND active = '1' and approve='1'"));
$result = mysql_query($query) or die ('Query Error: ' . mysql_error());
header("Content-Type: text/xml");
header("Expires: 0");
print "<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\" xmlns:video=\"http://www.google.com/schemas/sitemap-video/1.0\">\n";
while ($results = mysql_fetch_array($result))
{
$title = $results['title'];
$viewkey = $results['vkey'];
$VID = $results['VID'];
$video = $results['flvdoname'];
$duration = $results['duration'];
$description = $results['description'];
print "<url>\n";
print "<loc>\n";
print "http://www.YOURSITE.com";
print "/";
print "view";
print "/";
print "$VID";
print "/";
print "$title";
print "/";
print "</loc>\n";
print "<video:video>\n";
print "<video:content_loc>http://www.YOURSITE.com/flvideo/$video</video:content_loc>";
print "<video:player_loc allow_embed=\"yes\">http://www.YOURSITE.com/player/player.swf</video:player_loc>";
print "<video:title>$title</video:title>";
print "<video:description>$description</video:description>";
print "<video:duration>$duration</video:duration>";
print "<video:family_friendly>yes</video:family_friendly>";
print "<video:thumbnail_loc>\n";
print "http://www.YOURSITE.com";
print "/";
print "thumb/1_";
print "$VID";
print ".jpg";
print "</video:thumbnail_loc>\n";
print "</video:video>\n";
print "</url>\n";
}
mysql_close();
print "</urlset>\n";
?>
Bookmarks