

By displaying random RSS feeds on a website we're gonna reach the highest level of content randomness for our webpages. That's why we'll built a Php application which is slightly more complex than the ones you have found on previous page
What is a RSS XML FEED?
Rss is an acronym for Really Simple Syndication, a family of XML file formats for web syndication used by news websites and weblogs. Websites that use RSS technology usually update content on a regular basis. RSS contents are delivered in a XML file which is standard-formatted.
A RSS Feed is basically a summary of a website's contents: links, texts, and various metadata.
To read RSS XML feeds, viewers need a so-called AGGREGATOR. An aggregator (or RSS reader) can be either a standalone software or a browser add-on.
Since RSS format is XML, to display this kind of feeds on a webpage (so it can be viewed via browser) we'll need to 'parse' the XML code and convert it into a plain html code.
PARSING a XML page
What we'll do is settin up a PHP application that grab an XML file from a specified URL and display it on a webpage as standard HTML. Then we'll add a random function to display RSS XML Feeds from different, unpredictable, Urls.
Click on button below to see final result

To parse XML we'll use RSS2HTML, a free PHP rss displayer available for download at Feedforall website. This script (copyrighted by NotePage, Inc.) is free for personal and commercial purposes, but CANNOT BE RESOLD.
We think this is the best XML parser actually. Maximum respect to its authors.
This script may look tricky at first glance, but it's not. A very little editing is required.
Basically, you can take the scripts as it is. Anyway there are a couple of variables you may need to edit. Those are:
$TEMPLATEfilename = "sample-template_SAFE.html";
This variable can be changed to another template file, if you wish. You'll find it at line 110 of richFeed.php (our RSS2HTML modified version).
$FeedMaxItems = 5;
At line 138 you fix how many records you want to show on your webpage. By default this number is 10000; we lowered this number to 5. That's enough. You can put any number of course.
At line 91 the script ask WHERE shall it find the XML file
$XMLfilename = "http://www.somesite.com/feed.xml";
This means that this script, by default, reaches and parses one single xml file. That's why we turned actual url into a variable
$XMLfilename = "$phrase[$item]";
'phrase' var is randomly generated by a simple function placed at the top of the script, line 20 to 26
$rssfeedUrl = $phrase[$item];
$item = rand(1, count($phrase));
floor($item);
The other parts of the code are dedicated to parsing functions and do not need any further editing.
Since we need a series of Urls the script must choose from, we have created a php file that contains a list of XML files direct links.
$phrase[1] = "http://www.wiredbyduffy.com/rss/wbdrss.xml";
$phrase[2] = "http://rss.hot.com/rss/wpf_allactuality.rss";
$phrase[3] = "http://liferants.rantworks.com/rss.xml";
and so on...
Last issue is about the HTML Template which is used by the script to display XML feed to a static browser-readable format.
The template included in zip file you can download from Randomizing for Ranking section features ALL xml metadata and contents, and can be viewed here
In our demo, we cut some contents to have a lighter structure. For our purposes, we just need some random, often updated content: displaying all metadata is useless. Anyway, you can decide to show any type of data. Just edit the template provided.

If you feel you still haven't found what you were looking for, you're advised to visit this large php (and other programming languages) scripts resource
ScriptSearch.com |
|