PDA

View Full Version : [PHP] Magpie RSS - Help



simplistik
June 23rd, 2006, 11:19 AM
So I'm tryin to integrate an RSS feed onto a site and after hour and hours of browsing through "free" RSS to HTML solutions I figured Magpie would be a good solution. However, I can't get it to work or at least don't know what needs to be done to make it display a specific feed (http://sportsillustrated.cnn.com/services/rss/ to be exact)

Anyway, could someone help me out one what I need to do... I didn't quite understand their instructions.
http://magpierss.sourceforge.net/

And actually if someone has a better RSS parser that I could use that they didn't just google, but have actually used that'd be great too. My only limitation is that it can't require the use of a SQLdb

Jeff Wheeler
June 23rd, 2006, 11:28 AM
What exactly are you having trouble doing? Were you able to include the files into your project? Were you able to call the basic methods?

simplistik
June 23rd, 2006, 11:46 AM
Yea essentially... I'm not sure how to include the files. And hopefully once it's up and working it just lists the RSS feeds like...

Title (#)
date
Description
________________________________________

Title (#)
date
Description
________________________________________

Title (#)
date
Description
________________________________________

and not have to input a url into the input box everytime

simplistik
June 23rd, 2006, 04:53 PM
:lol: bumping so it doesn't get burried to far down... that was quick.

Jeff Wheeler
June 23rd, 2006, 05:17 PM
Put the rss-* files and extlib inside a magpierss directory in the same directory as this script…


<?php

require_once('magpierss/rss_fetch.inc');
$rss = fetch_rss('http://rss.cnn.com/rss/si_topstories.rss');

foreach ($rss->items as $item) {
echo '<h1><a href="'.$item['link'].'" title="View '.$item['title'].'">'.
$item['title'].'</a></h1>';
echo '<p style="color: #666; font-size: 0.8em;">'.$item['pubdate'].'</p>';
echo $item['description'];
}

?>

simplistik
June 28th, 2006, 09:21 AM
Sorry took so long to reply but thx :D works like a champ!

Jeff Wheeler
June 28th, 2006, 12:09 PM
No problem. :)