Page 1 of 1
Basic RSS Help??
Posted: Tue Feb 14, 2006 12:45 pm
by Jr
Ok, I'm looking to use an RSS feed on my site to update weather, etc. I unfortunately have NO clue at all how it works so I don't know what to look for. Can someone help me out, maybe give me a few links for starters (anything would help).
Thanks,
Jr-
Posted: Tue Feb 14, 2006 1:34 pm
by RobertGonzalez
Google the term "PHP RSS script" and see what you get. There are thousands of scripts out there that take an XML file and chop it down into readable parts.
Posted: Tue Feb 14, 2006 1:37 pm
by Jr
what do I do though... just copy and paste it in a .php page and that's it?
Posted: Tue Feb 14, 2006 2:10 pm
by RobertGonzalez
Look into PHP's
filesystem functions. Basically you want to open the page, read the content into a file, scan that up to the point where your text starts and dump what is befor the text. Then scan the remaining portion of the file and dump what comes after the text. What you have left is the text you want to see.
All of these steps need to be in a .php file on a server that your company allows you to browse AND each of the sites that you grabbing content from need to approve your use of their content on your server (if you didn't write the content then you don't own the rights to the content).
Posted: Tue Feb 14, 2006 2:31 pm
by Chris Corbyn
Do you mean you want to pull data from another website's RSS feed? Or you want to create your own feed?
Posted: Tue Feb 14, 2006 2:46 pm
by Jr
pull information from other sites.
Posted: Tue Feb 14, 2006 3:06 pm
by RobertGonzalez
I AM SO SORRY. I totally posted an answer to another question in yours. I totally apologize if I confused you. My last post was not meant to go here. Sorry.
Damned tab browsing...

Posted: Tue Feb 14, 2006 3:27 pm
by Jr

hehe that's ok... Unfortunately though I still dont really know what I am supposed to look for. I need a page that takes the RSS from someone's page and seperates the text from the code? Isn't there any kind of built-in functions in PHP or something?
Posted: Tue Feb 14, 2006 3:42 pm
by Chris Corbyn
Grrr!!! This is the third time I've typed this reply because php.net keeps crashing my damn browser

No clue what's causing that, but before the page even loads my browser just hangs until GNOME asks me if I want to force quit
OK, back on topic
RSS feeds are XML. XML is easily parsed. PHP has a bunch of functions for doing this:
http://php.net/xml