Jump to content

Suggestions on news agrgregator scripts for news feeds


jwhite68

Recommended Posts

I am looking for a third party script that can allow me to pull in multiple RSS feeds, and display news headlines on my website. It can link to the main story on the news "owners" site.

 

I came across zfeeder which appears to do the job, but wondered if anyone out there has any comments/feedback on this zfeeder, or can offer any other suggestions that I could look into.

 

Thanks, jon

I've used the following (from Peter Lavin's OO book)

?php
//point to an xml file
$feed = "http://rss.news.yahoo.com/rss/highestrated";
//create object
$sxml = simplexml_load_file($feed);
foreach ($sxml->attributes() as $key => $value){
  echo "<p>RSS $key $value</p>\n";
}
echo "<h2>". $sxml->channel->title. "</h2>\n";
echo "<p>\n";
//iterate through items
foreach ($sxml->channel->item as $item){
  $strtemp = "<a href=\"$item->link\">".
    "$item->title</a> $item->description<br /><br />\n";
  echo $strtemp;
}
echo "</p>\n";
?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.