How to Display RSS feeds as HTML
Keep your content fresh by converting RSS feeds to HTML on your website. I use CaRP to display my most recent blog posts on the main page of one of my sites. It helps build traffic to the blog and the search engines like the fresh content on my website.
I am going to show you how to set up an RSS feed as HTML for your website.
- Your own website (kind of obvious but hey, I have to cover my bases)
- CaRP RSS to HTML converter
- Basic Knowledge of HTML
Alright, lets get started!
Quick glossary list
- CaRP - Caching RSS Parser
- RSS - Really Simple Syndication.
That is the depth of my discussing RSS with you. If you don't have a firm handle on RSS and what it is/does you probably shouldn't be trying to display RSS feeds on Squidoo or your website. - .htaccess file - a text file that contains Apache (server) directives.
Again, if you aren't too familiar with an .htaccess file you probably should have someone help you out with this project.
What in the world is CaRP and why do I need it?
CaRP is an acronym for Caching RSS Parser developed by Antone Roundy. He developed CaRP because he wanted to convert RSS feeds to HTML instead of javascript (as the majority of RSS to HTML converters do).I will not be going into the details on how to install the PHP script (CaRP) here. Antone does a fine job of that for you after you have it downloaded.
I already have a JavaScript feed that is displayed on my website. Why would I need to display RSS feeds in HTML?
RSS feeds displayed as JavaScript don't have the same effect on search engines because search engines don't execute JavaScript so they don't know what the JavaScript contains.
RSS feeds that are converted to HTML are slurped up like gravy by the search engines. Search engines love fresh content and converting RSS feeds into HTML is a great way of doing so.
Make sure (if you are not using CaRP) that if you already have an RSS converter that it is displaying the feeds in HTML.
Just go to your web page with the RSS feed(s) and 'view page source' (CTRL+U in Firefox). If you cannot find the text of your feed - neither can the search engines.
Get your free download of CaRP
Need a Reliable Web Host?
I love the honesty and transparency of Bluehost as well. The CEO, Matt Heaton, has a blog where he is upfront and honest about the company's mistakes as well as accomplishments.
Read his blog at mattheaton.com.
Important - What You Must do to make this work on non-PHP pages
AddType application/x-httpd-php .html
Upload the .htaccess file to either the CaRP directory or the directory where your feeds are displayed.
For example:
Say you created a 'news' folder on your website to hold your rss feeds like so - http://www.yoursite.com/news/
Simply upload your .htaccess file to the /news folder and everything should be working.
If you still see an error message check out carp.docs.geckotribe.com for a detailed FAQ, further instructions, and tech support.
Some books on HTML, CSS, and PHP that you might find helpful
The other books below are more in-depth in their respective categories and are excellent resources if you wish to further your knowledge of web design.
Step 1 - Download and install the CaRP php script
Get the CaRP script and follow the detailed (and super simple) instructions on installing it on your website.Also, if you are running CaRP on a non-php page such as .htm or .html refer to the workaround above that uses an .htaccess file to make things work.
Step 2 - Customize the RSS feed display settings
You can customize the display settings of your RSS feed either via a theme file (it's a CSS for your feed basically) or directly within the php code you enter into your desired web page.There is a ton of how-to documentation on pretty much every imaginable scenario if you get stuck and need help at carp.docs.geckotribe.com.
Use a div tag within a simple table (one row, one column) to set your various styles such as width, background color, and more.
Here is an example tag:
< div style="width:490px;border:1px solid #333333; background:#ffffff; padding: 5px; margin: 15px; 0px; 0px; 15px;" >
Note:
I had to add spaces around the < and > characters in order for Squidoo to display it. Remove the spaces if you use this method of controlling the look of your feed.
Step 3 - Add the CaRP Script to Your Web Page
Step 2 showed you how to customize the size of your converted RSS feed and here is the simple script to display the feed as HTML.Here is the Style just before we add the CaRP script-
< div style="width:200px;border:1px solid #333333; background:#ffffff; padding: 5px; margin: 15px; 0px; 0px; 15px;" >
< ? php
$carptheme='YourCaRPtheme';
require_once '/home/carp/carp.php';
// Add any desired configuration settings before CarpCacheShow
// using "CarpConf" and other functions
CarpCacheShow('http://www.RSSFeedURL.com/blog/feed/rss');
? >
Again, I had to add spaces around the < and > so as not to confuse Squidoo.
The bold items are those that you will have to change for your RSS to HTML project. You don't have to create a theme to customize your RSS feed display, but it makes it easy to change the look of several feeds at once by only having to change the theme instead of each separate instance of the CaRP script.
Example of a Theme For Your Converted RSS Feed
Again, spaces were added around the < and > to keep from confusing Squidoo.
< ? php
/*
My CaRP Theme
Version 1.0
by ME
*/
// Set up the title format
CarpConf('cborder','link');
CarpConf('bctitle','< center >');
CarpConf('actitle','< /center >');
CarpConf('bitems','< ul class="carpthemename" style="margin:0;" >');
CarpConf('aitems','< /ul >');
CarpConf('bi','< li >');
CarpConf('ai','< /li >');
// surround the item link with a DIV
CarpConf('bilink','< div style="padding-bottom: 15px;" >');
CarpConf('ailink','< /div >');
// set the CSS classes of the channel and item links
CarpConf('clinkclass','h2');
CarpConf('ilinkclass','h3');
CarpConf('poweredby','< br / >');
// set what is displayed
CarpConf('iorder','link');
CarpConf('maxitems',3);
//CarpConf('maxidesc',200);
CarpConf('aiauthor','< /i > - ');
CarpConf('aidate','< /i >');
CarpConf('bidesc','< br / >');
? >
Drop that into a text editor and save as the name of your theme like so - mycarptheme.php and upload that into the 'themes' folder where CaRP is located.
For more information on how to individualize your theme check out carp.docs.geckotribe.com.
FYI - you need to submit an email address for the CaRP download link
In order to download the free (basic) version of CaRP you submit your name and an email address. You will receive a confirmation email with a link that you must click in order to download CaRP. You will also receive a seven day email course from Antone (CaRP developer) entitled "RSS into Dollars."
You can delete the mini-course emails if all you want is CaRP. You will also receive any updates to CaRP via email.
I didn't want to tell people to just visit this website and download CaRP. I wanted folks to be aware that you would have to enter an email address in order to get CaRP. Some people just don't want to give out an email address to download something.
That said - in over a year of using CaRP I have only received the 7-day mini-course, a newer version of CaRP, and once received an email to upgrade to CaRP Evolution at a nice discount (which I did since I loved the basic version of CaRP).
You don't get junk mail by submitting your email to download CaRP.
Still interested? Try CaRP out for yourself.
Ask Your Questions or Leave a Comment
If you have any questions or comments I would be happy to try and answer them.
Have a Great Day!
-
Reply
- Auntiekatkat Auntiekatkat Nov 5, 2008 @ 6:23 am
- Brilliant lens fantastic subject and superbly wee written you deserve the five stars I am sending to you
-
Reply
- sonia_simone sonia_simone Aug 16, 2007 @ 5:59 pm
- Thank you, this is very useful! I'm a tweaker by nature and have been wanting to do this on my site, so I am gonna puzzle it out.
by AllThingsMichigan
Born and raised in Michigan - the Great Lakes State. I love how easy it is to set up a lens at Squidoo. I get so many ideas for new lenses...
(more)







