Top 5 video RSS

unlimeet posted 28th of July 2008 in Community Voice. 3 comments.

Here is a small code for the top5 video, can be used like exemple (easy to do the same for music for exemple):


// next, query for a list of titles, files and links.
$result = mysql_query("select * from RayMovieFiles, gvideo_rating where ID = gal_id order by gal_rating_sum DIV gal_rating_count desc limit 5");

// third, build the playlist
echo "<rss version=\"2.0\" xmlns:media=\"\">\n";
echo "<channel>\n";
echo "<title>RSS Top5 playlist</title>\n";
echo "<link></link>\n";
while($row < mysql_numrows($result)) {
echo "\t<item>\n";
echo "\t\t<title>". mysql_result($result,$row,'Title')."</title>\n";
echo "\t\t<description>" . mysql_result($result,$row,'Description') . "</description>\n";
echo "\t\t<media:content url=\""."viewVideo.php?=" .  mysql_result($result,$row,'Uri') . "\" type=\"video/x-flv\" />\n";

echo "\t</item>\n";
echo "</channel>\n";
echo "</rss>\n";

Hope that this small exemple can help somebody :-)

Please login to post a comment.
In what file should it be posted?
Can you give me more details on filename (or can i make it up), what needs to be changed in the script to make it work, etc...

Thanks. :)
Just creat a file name rss.php and copy all this script inside.
Go to and you will have the result :-)
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.