Adding RSS Feeds to Your Web Site Using Carp 13


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).

Unzip Carp

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.

FTP Carp to Server

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

Setup Carp

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:

Carp Installation Successful

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

Install Carp Feed Instructions

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:

Delete Carp Setup File 1

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

Delete Carp Setup File 2

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:

SSI

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:

Demo Carp 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:

Final Carp 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.


Leave a comment

Your email address will not be published. Required fields are marked *

13 thoughts on “Adding RSS Feeds to Your Web Site Using Carp

  • Hugh Harris-Evans

    Hi Andy,

    I used to use Carp until I found RSS2HTML which is free from http://www.feedforall.com/free-php-script.htm

    The script uses a single php file with a second html file to format the feed.
    You can see an example on my Alzheimers site. In that case I just used the rss2html php file without any formatting, but it is easy to improve the look by adding formatting instructions.

    I’ve also found this script for use with wordpress:
    http://rawlinson.us/blog/articles/feedlist-plugin/

    Hugh

  • Herb Pagano Jr

    Andy,

    Maybe it’s me, but I don’t see the code to add to a webpage to display an RSS feed:

    “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.”

    Thanks,
    Herb

  • Andy

    Herb
    My fault (or should I say WordPress’ fault). I added the code in a way that should have made it visible, but it wasn’t. I have fixed in temporarily until I can find a plugin that can handle this. In the code you see, just remove the and bits

  • Steve Baker

    Hi Andy,

    And may I say, brilliant! I’ve been looking for a way to do this for about a year now and never came up with anything.

    At first, I couldn’t get it to work at all. I finally worked out that the line: “” should read: “” (two hyphens instead of one). Once I’d altered that everything worked great.

    Many thanks

    Steve

  • Herb

    Hi Andy,

    Just curious: The advantages of an RSS feed to a website are obvious. And CaRP seems fairly straightforward. But for a WP blog, would you also consider plug-ins? For example, Multifeedsnap or Feedwordpress.

    Any of your insights are appreciated.

    Thanks,
    Herb

  • hayem

    i would like to know what search engines think about RSS feeders in this case Carp?will not this code create duplicate content and ban my website?

  • John T.

    I need a little more help, stuck on step 4 part 3. When using wordpress, where do we install the SSI.

    Step 4.4 upload the modified webpage to your server. What page in wordpress is to be modified? then uploaded. can the plugin it self be edited. I am not talking about Carp-WP. I am lost on this part.

  • Andy

    John
    Put the line of code (step 4, part 3) into the page you want the feed to display (wherever you want the feed to display).

    Since you are inserting a line of code into a page, you are modifying the page, right? That is the page you need to upload.

  • John T.

    I did not explain myself correctly. I can install the script to a webpage and upload it. I think I am getting ahead of myself.

    I expect you just want us to go thru an exercise to see the achievement, if it works.

    I had my head around installing it to wordpress. Uploading within wordpress was new to me, it may be done, but I do not know. All editing I read before was thru the plugin editor.

    Is that the correct assumption?

    Just thought if it is a wordpress affiliate tutorial, the feed would be added within the wordpress itself.

    Thanks for your previous help.

  • Rick S.

    Perhaps I’m not seeing it but, besides being installable on a non-WP site, are there any advantages that Carp has over WP plugins like WP-O-Matic or YAAB that essentially give you a platform for managing and posting multiple feeds from within multiple campaigns?

  • Mike Block

    Hi Andy: I have been looking for a Carp programmer to do this, for 20+ sites, for around 4 years (it may just seem like that). Can’t I hire you? Anything you would charge should be cheap compared to continuing delays.