-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|519|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
SoCoder -> Link Home -> Help/Tutorials


 
HoboBen
Created : 15 June 2007
Edited : 15 June 2007

Building and Using an RSS Feed

An understandable how-to-make-an-RSS-feed tutorial

https://www.xul.fr/en-xml-rss.html
Finally, an understandable RSS building tutorial!

Also, a tip from me:

To generate your RSS using PHP, save the following code as a file called ".htaccess" in the same directory as your RSS feed:



And your XML will be parsed as PHP. To avoid <?xml version="1.0"; ?> being parsed as PHP (and causing an error), replace it with:


 

Comments


Friday, 15 June 2007, 09:23
Jayenkai
I didn't do it that way. Basically I figured that that'd use up a lot of CPU time that can be better spent elsewhere.

What I did, was, everytime a post is made, the script performs an RSS feed command, which goes through and creates the xml files. Saves having to keep generating them every few minutes, but also keeps them up to date, since their created every time there's new stuff.

And, can I say that I never once needed instructions for an RSS feed! They're not hard, just look at one, and it's pretty obvious how it all works.
My one complaint is that you don't seem to be able to add &'s and ?'s to url's (depending on the end user's reader), making mostly all links to this site mess up!
Friday, 15 June 2007, 10:01
HoboBen
Eh, fair enough. I've just had bad experiences with RSS tutorials then!

I've added "&"s and "?"s everywhere into mine (I find apache mod rewrites difficult to understand, otherwise I'd figure pretty urls out) and they seem to work fine but does that mean some RSS readers will still choke on my feed then?

Mind you, I'm not expecting my RSS to be used by people - it's read by server-side thingies. mainly I'm just using it for Feedburner's automatic RSS-to-email subscription thing and my Technorati page too.
Friday, 15 June 2007, 10:34
Jayenkai
Yeah, if I remember rightly, Google Reader wouldn't process links with ?'s and &'s, and I'm sure there were other things, too.
That's why, nowadays, you see links with loads of /'s in them instead.
Friday, 15 June 2007, 11:10
svrman
I did something similar with my page scraping article a while ago - blog entry here

I used

in my php file to change it into a xml.