Adding RSS Feeds to Your Web Site Using Carp
July 2, 2008
Adding ever-changing content of any kind to your site is a good thing.
Reasons include:
- Pages that change regularly are seen as fresh by the search engines, which brings the search bots back to your site more frequently, and possibly help your site rank better.
- Visitors will come back if your page content changes often.
- New, current content for your site should be a target of all webmasters.
RSS feeds offer the busy Webmaster a big advantage.
1. RSS Feeds can be set to auto-update on your site without the Webmaster having to do anything.
2. Feeds will bring the LATEST news to your site, giving your visitors the latest information in your niche.
Armed with a free website script called Carp, and an FTP program such as the excellent (and also free) Filezilla, you can add RSS feeds to any site in a matter of minutes.
Download the Filezilla Client software here.
Download Carp Here.
In this example, I’ll show you how to add the RSS feed for my ezSEO Newsletter blog to a website.
Step 1. Download and unzip Carp
Once you have downloaded and unzipped Carp, you will have a folder that contains the following files (note: I have the paid version, so you may see slightly different files in the free version).

Step 2. Uploading the files to your server
Run Filezilla, and setup an account for logging into your domain space.
If you are unsure how to do this, read the Filezilla help file, and contact your web hosting company for the necessary information.
Select & Drag across the carp folder, and the carpsetup.php file from your local folder to your webspace.

Step 3. Install Carp
Once the upload is complete, go to the “carpsetup.php” file on your server using your web browser. Simply type in the full path to the carpsetup.php file on your server.
E.g. http://mydomain.com/ carpsetup.php

For this tutorial, we’ll leave the defaults selected, and then click the continue button.
If the install was successful, you should now find a demo feed being displayed in the web browser:

.. followed by instructions for including the feed on your site:

The last bit of code is the important bit.
Notice that this code is PHP, which means it needs to be inserted on a .php webpage.
Before we go onto that, we first need to delete a couple of files on the server.
The first file to delete is the carpsetup.php file:

The second file is inside the carp folder, so double-click the carp folder to access its contents.

You need to delete the carpsetupinc.php file.
Step 4. Adding the php code to your site
Now, I don’t know about you, but I don’t use the .php extension on my webpages, and I don’t want to start switching existing page extensions. I also don’t want to use .php extensions on new pages just so I can include a feed.
Here is how to get around this.
1. Create a php file to hold the carp script code.
Simply create a file and call it something like feed.php. Then paste in the code you were given by the carp install.
2. Save the file and upload it to your server.
Upload the file to your domains “root folder”.
3. Use Server Side Include to include the php file in your web page.
SSI is a really useful tool for webmasters, and one that is well worth learning how to use. For a Linux server, type the following code into your webpage where you want the RSS feed to display:

NOTE: This assumes the page you are inserting this into is in the same folder as the feed.php file.
4. Upload the modified webpage to your server.
5. Modify the .htaccess file.
If you tried looking at your page, you would still not see a feed. You need to tell your server that the pages on your site need to be “parsed” – i.e. checked for server side includes. This is easy. Assuming you are using a Linux server, add the following line to your .htaccess file:
AddHandler server-parsed .html
You can add this line anywhere in the .htaccess file. If you do not have an .htaccess file in the root folder of your site, contact your web hosting company. You should just be able to create one.
6. Load your site.
Now when you go and look at your web page, you’ll see the demo Gecko Tribe feed:

7. Changing the feed.
You probably want to choose a feed that is related to your site. Here, I’ll show you how to add the feed for my own Wordpress blog to your site. The code used in the feed.php file is as follows:
require_once '/xxxx/xxxx/xxx/carp/carp.php';
// Add any desired configuration settings before CarpCacheShow
// using "CarpConf" and other functions
CarpCacheShow(’http://www.geckotribe.com/press/rss/pr.rss’);
?>
You need to change the last line. CarpCacheShow is the command used by carp to identify the feed. The feed currently being used is:
http://www.geckotribe.com/press/rss/pr.rss
Change this to point to the feed you want to display. In this case, the URL of my feed is:
http://ezseonews.com/blog/feed
My new php code is therefore:
require_once '/xxxx/xxxx/xxx/carp/carp.php';
// Add any desired configuration settings before CarpCacheShow
// using "CarpConf" and other functions
CarpCacheShow(’ http://ezseonews.com/blog/feed ‘);
?>
Refreshing my webpage now shows me the ezSEO News feed:

The next step is to modify the carp php file to format, and change the way the feed is displayed. You can read how to do this in the Carp Documentation, but for now, let me just show you what my final php code is for this feed (new additions are in bold). You can copy the exact code yourself, you just need to change the location of the carp.php file in the first line of the php script:
require_once '/xxxx/xxxx/xxx/carp/carp.php';
// Add any desired configuration settings before CarpCacheShow
// using "CarpConf" and other functions
CarpConf('maxitems',3);
CarpConf('ai','
‘);
CarpConf(’iorder’,'link,desc’);
CarpConf(’bidesc’,’‘);
CarpConf(’aidesc’,’‘);
CarpConf(’maxidesc’,145);
CarpConf(’atruncidesc’,'…’);
CarpConf(’descriptiontags’,'b|/b|i|/i’);
CarpConf(’poweredby’,”);
CarpCacheShow(’ http://ezseonews.com/blog/feed ‘);
?>
Here is the display of my final feed:
That wasn’t so hard, was it?
To see how to find other RSS feeds to display, read the Carp documentation.
To see what extras are included in the paid version of Carp, read the documentation that comes with Carp SE.



