Basic RSS Help??

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
Jr
Forum Commoner
Posts: 99
Joined: Mon Mar 07, 2005 3:25 pm

Basic RSS Help??

Post 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-
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post 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.
Jr
Forum Commoner
Posts: 99
Joined: Mon Mar 07, 2005 3:25 pm

Post by Jr »

what do I do though... just copy and paste it in a .php page and that's it?
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post 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).
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post 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?
Jr
Forum Commoner
Posts: 99
Joined: Mon Mar 07, 2005 3:25 pm

Post by Jr »

pull information from other sites.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post 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. :oops:

Damned tab browsing... :x
Jr
Forum Commoner
Posts: 99
Joined: Mon Mar 07, 2005 3:25 pm

Post by Jr »

:lol: 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?
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post 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
Post Reply