Download RSS scroller script


Bookmark and Share

Download files

You can download the entire project from this zip file.

Files included in package

  • rss-scroller.html = The main HTML you open in your browser
  • js/ajax.js = Ajax (SACK library)
  • readRSS.php = File that reads RSS data from a source. rss-box.html uses Ajax to retreve data from this file.
  • lastRSS.php = RSS parser download from


Server side support

This script requires that you have access to PHP on your webserver.

Creating RSS box and specify url of feed

This scripts loads content from an external RSS file into a div on your page. The first you have to do is to put in an empty div where you want the RSS box to appear. Example:

<div id="rssBox">

Then you need to specify

  • The url to your RSS source
  • Which div you want the RSS data to be placed
  • How many items you want to read from the source
  • Time between each item is shown in the box.

All this is something you specify by calling a Javascript function named "insertAjaxContent". Example:


"rssBox" refers to the empty div you created, Then we have the url to the external RSS feed. I have specified that I only want the 5 newest items to be shown and the script should show an item for 3 seconds before switching to the next one.


The script uses plain CSS for the layout. This is the CSS for the demo:

  border:1px dotted #317082;

#rssBox .slide{ /* A specific slide */
  background-color:#E2EBED; /* Light blue background color */
  display:none;  /* I don't want to show the date */
.rssBoxHeading{  /* Heading of RSS item */
.rssBoxDescription{  /* Description of RSS item */

.rssBoxLink{  /* Read more link */
.rssBoxLink:hover{  /* Read more link - mouse over */

Javascript variables

You have two Javascript variables available:

var rssBoxTxt_readMore = 'Read more';
var rssBoxOpenLinksInNewWindow = true;
var rssBoxPadding = 2;
var rssBox_slideSpeed = 7;
var rssBox_waitBetweenEachSlideStep = 5;

  • rssBoxTxt_readMore = Link label, i.e. the "Read more" link.
  • rssBoxOpenLinksInNewWindow = Open "Read more" links in new window or not. true = new window, false = same window
  • rssBoxPadding = Padding inside parent box
  • rssBox_slideSpeed and rssBox_waitBetweenEachSlideStep = Determines speed of sliding


That not work :-(
Jay at 04:50PM, 2011/04/18.
works fine - thanks!
Razvan at 10:23PM, 2011/09/08.
There are several ways to read RSS feed in PHP, but this one is surely one of the easiest.<?php$feed = file_get_contents(‘’);$rss = new SimpleXmlElement($feed);foreach($rss->channel->item as $entry) {echo “<p><a href=’$entry->link’ title=’$entry->title’>” . $entry->title . “</a></p>”;}?>Source: <a href=""></a>OR<a href=""></a>
Aneeq at 10:00AM, 2012/04/24.
Bruce Fanning
Outstanding scroller, good set up instructions with the style sheet too, Thanks!
To often I've downloaded a widget & and there's ZerO! instructions and never a style sheet to start with - that's good work y'all. B
Bruce Fanning at 05:47PM, 2019/04/04.
Troy Johnson
The Scroller script is not working for me, and while I can hook up javascript files, I can't write anything new so I don't know how to fix it. Instead of showing my feed, the rssBox div is showing the contents of the readrss.php file. The .js and .php files don't seem to be plugged into each other correctly. The directory files are organized just like in the demo, they are just in my development environment now so I am pretty sure I didn't break anything.
Troy Johnson at 11:39PM, 2020/03/04.
Drugs information for patients. Drug Class. <a href="">can you get viagra without a prescription</a> in US. Best what you want to know about medicines. Read now.
[url=]Everything trends of medicine.[/url] [url=×tamp=1593900000]Everything news about pills.[/url] [url=]Actual trends of drug.[/url] 9925b36
HphLS at 10:18AM, 2021/01/10.

Post your comment

Don't have an avatar? Create one at

Confirmation code:

Go to

About/Contact | A good idea? | Submit a script | Privacy notice
© 2005 - 2021