Hi,
I want to read and display a RSS feed from a news site onto my website, for instance this is the RSS URL which I want to pull the news feed from,
http://pipes.yahoo.com/pipes/pipe.run?_ ... render=rss
I have been searching for some tutorial online, but still cannot find any good resources.
Please let me know whether you know any tutorial online, or you know how to programme this with php.
Many thanks,
Lau
How to read and display a rss feed on my website with php
Moderator: General Moderators
-
lauthiamkok
- Forum Contributor
- Posts: 153
- Joined: Wed Apr 01, 2009 2:23 pm
- Location: Plymouth, United Kingdom
Re: How to read and display a rss feed on my website with php
You want something like MagpieRSS.
I use it on a site I'm currently making. I can try to help you set it up if you'd like.
I use it on a site I'm currently making. I can try to help you set it up if you'd like.
-
lauthiamkok
- Forum Contributor
- Posts: 153
- Joined: Wed Apr 01, 2009 2:23 pm
- Location: Plymouth, United Kingdom
Re: How to read and display a rss feed on my website with php
hello, thanks for the offer and help. yes someone has pointed out MagpieRSS and now I am working on this. it looks great!
http://magpierss.sourceforge.net/
best,
Lau
http://magpierss.sourceforge.net/
Code: Select all
require_once 'rss_fetch.inc';
$url = 'http://pipes.yahoo.com/pipes/pipe.run?_id=YGtVQgki3hG_o3ZZ0j6skA&_render=rss';
$rss = fetch_rss($url);
foreach ($rss->items as $item) {
$title = $item[title];
$url = $item[link];
echo "<a href='$url'>$title</a><br />";
}best,
Lau