Download RSS box script


Bookmark and Share

Download files

You can download the entire project from this zip file.

Files included in package

  • rss-box.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;

  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;

  • 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


Can you please post the DEMO links..??
Munna at 08:25AM, 2012/04/15.
Can I load more news?Thank You !
Stefano at 09:18AM, 2012/09/08.
This code no longer works tried would not show feed. 9/25/2012.............
Lance at 06:23PM, 2012/09/25.
amir leyto
thank you so much for that if i want to display rss with animation like type effect what i have to do?i used css animation but doesn't work.sorry for english
amir leyto at 06:01AM, 2015/08/17.

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 - 2019