Web Hosting Talk







View Full Version : How to use XML/RSS feed on my site ??


PurpleCow
11-23-2003, 11:43 AM
Hello,

Lets say, i want to run a news section on my site and a particular portal or news service is offering XML/RSS feed for my kind of topic.

If i want to use such a news feed, do i need to have any special feature for my hosting account and also how do i use the XML/RSS feed ??

Do i just have to copy and paste the XML/RSS code on to my site and place it wherever, i want the news/headlines to appear ??

Thanks for the help.

Cheers

Rich2k
11-23-2003, 12:33 PM
The simplest way is to make sure you have XSLT enabled in your PHP configuration and use that.

There are plenty of XSL stylesheets for RSS around the web that you can download.

jeffbarr
11-23-2003, 09:20 PM
You most definitely do not want to simply paste the RSS code into your site.

RSS is a data format, not a presentation format.

To use RSS, you will need:

[list=1]
The URL to an RSS feed
Code to fetch the RSS at regular intervals (but not too frequently)
Code to parse and display the RSS
[/list=1]

It just so happens that I run a site devoted to the collection of RSS feeds .syndic8.com (sorry, I am a newbie here and cannot post links yet).

On that site, I also have a directory of various tools and toolkits for processing RSS. You can find these in the Documents section of the site. The sections on Toolkit Information and Products should be useful to you.

You most emphatically do not want to set up your site in such a way that it will fetch the RSS every time you generate and display a page. This will slow down your site and will place a very high load on the RSS provider. Accepted practice is to load the feed no more often than every 60 minutes. Instead, you want to load and cache the RSS locally.

PurpleCow
11-24-2003, 03:31 AM
jeffbar - Thanks for the detailed info and also the pointers. Infacr i was one of the first to register on your site when u initially launched it, just happen to forget ur site in the due course.

I am looking thru' ur site to get some help, if i need any help, hope, i can contact you by PM ??

Also, i'd like to know, if it is possible to setup/have a XML/RSS feed for a static site ??

Rich2k..thanks much

Cheers

Website Rob
11-24-2003, 05:50 AM
jeffbar, syndic8.com seems to have a problem at this time -- nothing loads? You also might want to talk with your Hoster as right now, you only have one Nameserver -- which is not good.