Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Import RSS Feed

Status
Not open for further replies.

alphacooler

Programmer
Aug 29, 2005
73
US
I'd like to allow my users to submit their blog url so I can grab the RSS feed and display it on my site. Obviously I would need a script to periodically (say every night) get the latest copy.

What would be the basic steps to accomplish this? I'm clueless where to start (i've never worked with feeds before).

Thanks!
 
jpadie,

Thanks! That was very enlightening. I couldn't find much help on how to use some functions though, like getImages().

Also, if I am "importing" their blogs should I just store the feed url or the actual contents of the blog too? It would seem that I could just have my script parse up the feed everytime a user visits the blog on my page no?

Also, do you have any handly tutorial-style links? The PEAR documentation wasn't quite as rich as the PHP docs.

And again, thanks so very much.

k
 
It would seem that I could just have my script parse up the feed everytime a user visits the blog on my page no?

you could but the site may get a bit annoyed with you! i would cache the results for a while before rehitting the rss feed.

tutorials - sorry i don't know of any. did google not come up with any goodies? you could always post a message on the pear mailing list.
 
So by caching you mean I would have to grab each feed and store it into my database, then have a script go out once a day and grab a new copy to overwrite the existing db entry for that feed?
 
that's one way. you could also just save the xml document in your filesystem or use an actual content caching systems like PEAR_Cache or PEAR_Cache_lite
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top