Back to this demos blog post ...

More demos

jQuery and PHP RSS Feed Autoloader



This is a very simple jQuery and PHP combo that autoupdates with the most recent story from an RSS feed every 10 seconds. After 10 seconds pass jQuery uses the .load method to pull data from the remote feed via a small PHP script. The end-user provides a link to the feed they'd like to display in the included rssfeed.php (in the demo it's BBC News).

Note: as the PHP script is executed every 10 seconds per user, it may be an idea to cache the feed (to an SQL DB for instance) if this is going to used on a high-traffic site. I didn't add this here for the sake of simplicity.


« Back to the post