pull urls from rss feed

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
alt303
Forum Newbie
Posts: 6
Joined: Sat Aug 23, 2008 6:12 pm

pull urls from rss feed

Post by alt303 »

Hello everyone. I have a question, but I'm not even sure if this is possible.

How can I take an rss feed, like http://website.com/feed.xml or a feedburner feed and extract the latest 20 urls from it? Then, I would want to randomly display one of those 20 pages.

Please note that I am not talking about displaying an rss feed on my website. I would just like to use the rss feed url to find the 20 latest articles or posts, then display one of them. As in display the actual page of the website with that article, not a link and description of it.

Thanks for any help and I hope I am clear. 8)
User avatar
andyhoneycutt
Forum Contributor
Posts: 468
Joined: Wed Aug 27, 2008 10:02 am
Location: Idaho Falls

Re: pull urls from rss feed

Post by andyhoneycutt »

You'll need to read a bit about parsing XML and also something like cURL or fopen to actually retreive the data. Once you have the data you can either store it and redirect to it, or you can simply print it to the browser.

-Andy
Post Reply