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

Link to comment
Share on other sites

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";
?>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.