Active Web Hosting Logo


How To Add An RSS Feed To Your Web Site

Introduction

An RSS Feed is a special XML file that contains the most recent articles or posts to a web site, blog, content management system, forum, etc. Once you know the RSS feed link, you can easily incorporate it into your web site. RSS feed links look like XML code if you click on them in your web browser. However, you can format this to fit your web site using RSS2HTML.

IMPORTANT NOTE: RSS2HTML may not work on our servers. However, due to changes in the most recently available code, the rss2html.php file will fail to load the RSS feed onto a web site. We are providing the tutorial as a reference at this time. Meanwhile, you can also use the script hosted on their own servers by using the code below to access your feed instead. Note that the code should be all on one line. See Adding Feeds To Your Web Site below to learn what to change in the code below. If you must go this route, you will need to upload only your template and not the rss2html.php script to your server.

IMPORTANT SECURITY NOTE!
Always be sure you have installed the latest updates and/or patches for the script as well as for any additional add-ons. Updates are very important to the security and proper functioning of the script! Our instructions may be for earlier versions of scripts due to the fact that we are not able to keep up with updates to every script at all times. It is still up to the domain owner to install and use the latest version of these scripts.

<iframe style="width:180px;height:210px" name="myfeed" frameborder="0"
src="http://www.rss2html.com/rss2html.php?XMLFILE=http://RSSFeedLink.xml
&TEMPLATE=http://yourdomain.com/rsstemplate.html&MAXITEMS=5"></iframe>

Setting Up Your RSS Feed Parser

  1. In order to put a neatly formatted RSS feed on your web site, you'll need to Download the RSS2HTML script. Select the download for Option 1.

  2. Next extract the files from the zip archive into a directory on your hard drive.

  3. Open a text editor program, copy and paste the code below and save it as rsstemplate.html. Note that you may make some modifications if you wish. See the rss2html-docs.txt file that comes with the script for more information. We'll give you two popular choices to choose from:

    Choice 1: Date & Title Display

    <html>
    <head>
    <title> RSS Feed </title>
    </head>
    <body style="margin:0px">
    <table cellpadding="0" cellspacing="0" width="150">
    ~~~BeginItemsRecord~~~
    <tr valign="top"><td><font face="arial" size="1">
    ~~~ItemPubShortDate~~~<br>
    <a href="~~~ItemLink~~~">~~~ItemTitle~~~</a><br><br>
    </font></td></tr>
    ~~~EndItemsRecord~~~
    </table>
    </body></html>


    Choice 2: Date & Title & Short Preview with Link Display

    <html>
    <head>
    <title> RSS Feed </title>
    </head>
    <body style="margin:0px">
    <table cellpadding="0" cellspacing="0" width="600">
    ~~~BeginItemsRecord~~~
    <tr valign="top"><td>
    <font face="arial" size="2"><b>~~~ItemTitle~~~</b></font>
    <br>
    <font face="arial" size="1">
    ~~~ItemPubShortDate~~~
    <br><br>
    ~~~ItemDescription~~~
    <br>
    <a href="~~~ItemLink~~~">Read More...</a>
    </font></td></tr>
    ~~~EndItemsRecord~~~
    </table>
    </body></html>

  4. Log into your CGI server with your FTP program. Upload the rss2html.php to the root directory of the CGI server (not in a sub directory) and change the permissions to 755 . Log out of the CGI server and upload the rsstemplate.html file to your web server root directory (not in a sub directory).

Adding Feeds To Your Web Site

Now that you have the script installed, you will need to know the link to the RSS feed.

Note: The code must be entirely on one line, without line breaks. The code shown below is split up so you can copy the entire code. Be sure it is merged into one line in your HTML code.

Replace all instances of yourdomain.com to your actual domain name.

Replace the highlighted area that says "http://RSSFeedLink.xml" in the code below with the RSS feed link.

Adjust the highlighted MAXITEMS= to display as many items from the feed as you wish.

Adjust the width/height highlighted in the code so that your feed fits properly in your web page. Note that you might have to adjust your rsstemplate.html file and reupload it as well until you get the look you want. You may need to do some experimenting until you get it to look satisfactory.

If you are using more than one feed on a page, change the highlighted name= to something unique for each feed.

<iframe style="width:180px;height:210px" name="myfeed" frameborder="0"
src="http://cgi.yourdomain.com/rss2html.php?XMLFILE=http://RSSFeedLink.xml
&TEMPLATE=http://yourdomain.com/rsstemplate.html&MAXITEMS=5"></iframe>

Troubleshooting

If for some reason the display is erroneous, or you get raw XML code, then this RSS reader may not be compatible with the feed you are using. If it's your own blog or forum, etc. then see if there is a special script, plugin or add-on that lets you add this content to your normal web site.

Support

For more information and/or support, please refer to the RSS2HTML Web Site.

Active Web Hosting may not be able to provide support for this program or it's installation.

 


Home - Support - Management - About Us
... Active Web Hosting, 1445 American Pacific Dr. Ste 110-318, Henderson, NV 89074 ...
Toll-Free (800) 946-7764   Fax: (702) 567-1831