How to publish RSS feeds
by Brian Turner
If you're new here, you may want to subscribe to my RSS feed. Thank you for visiting!

There are a load of different reasons why you may want to publish a RSS feed on your site.
Commonly you may want to publish specific items to a certain page on your site, or else publish latest posts or similar in your navigation for human users and search engines.
Certainly Platinax uses a couple of different methods to publish feeds on the Platinax home page.
The aim is to display latest items from the news, blog, and forum sections.
There are a variety of different scripts you can use, and these should easily do most of what’s required of them.
NOTE: All of the scripts below are written in PHP and presume you’re running on a standard LAMP (Linux, Apache, MySQL, PHP) server.
To execute PHP on a page with a file extension other than .php, simply add this code in your .htaccess file in your domain home folder:
AddHandler application/x-httpd-php .html .htm .php
1. Headlines only
Publishing headlines from RSS feeds is a very common requirement.
For example, it’s a simple and effective way to publish latest headlines in your site navigation, which can be pulled either from somewhere on your own site or a third party.
The beauty of this script is that it’s so easy to implement - simply change the URL provided as the feed source, and paste in the code to your own site where you wish it to be displayed.
Easy. :)
PHP Script for republishing a RSS feed: 1 (txt)
Just copy/paste the code from the text file above as required.
A great point about the above code, is that you can re-use it as many times as you need on a single page.
So if you want to create lists focused on republishing from different feed sources (such as blog categories) then it’s simple and easy to do so.
2. Headline and descriptions
Sometimes you may want to publish more than just the headlines, but also the description provided with the feed as well.
In which case, I use either of the following PHP scripts to publish feed items with excerpts:
Just copy/paste the code from either text file above as required.
You may or may not find that one of the two above works best with your server configuration. And as before, simply change the feed URL with the one of your choice.
3. Selective feed publishing
On the Platinax homepage, simply publishing headlines alone felt like it left the site empty of text - but publishing descriptions with everything seemed to overdo it.
So I needed a PHP script that would publish 1 or more excerpts, and 1 or more headlines, according to a configurable set of rules.
For that I use Easyfeeder, which is a simple to set up script.
It may seem a little complicated compared the other two above, but it’s simple enough to implement. However, if you do have problems, feel free to ask on our PHP board.
There two files:
- easyfeeder.php
- template.html
Copy the code below into the file names designated, then place them in your root home folder (ie, public_html on CPanel):
template.html
To implement, place the following code above the header of your designated page:
and make edits as required.
Then, where you want to call up the script, simply use this code and modify the feed source as required:
What’s really neat about this script is that it’ll also run in a CMS such as Wordpress. Simply insert in header.php above everything else.
I’ve got to admit, I have had some issues with some installs of this script, where the feed will not publish exactly as required - but as a freebie, it’s been invaluable in helping to order presentation as required.
Overall
Publishing RSS feeds from your own - or a third party site - can really help with the overall presentation, and help both search engines and human users find your content more easily, in quite palatable amounts.
It’ll help to have a clear idea of what you want to actually want to achieve in terms of republishing RSS feeds before implementing, but hopefully some of the above scripts will help you with that.
Discuss this in the Internet Business forums
Story link: How to publish RSS feeds
Add to Bookmarks:
Related stories:
Leave a Reply
Previous: « Microsoft extends Windows XP for five-months
Next: Adobe acquires Buzzword word processor »
Visited 379 times, 2 so far today




