Posted By

yuconner on 09/02/06


Tagged

rss feed


Versions (?)

Who likes this?

8 people have marked this snippet as a favorite

mate
millisami
yuconner
blakeb
vali29
JimiJay
nb109
techdetours


magpierss RSS feed display example


 / Published in: PHP
 

URL: http://programming.linux.com/article.pl?sid=05/05/24/1337210

for full html content: $content = $item['content']['encoded'];

  1. <?php
  2. require_once('magpierss/rss_fetch.inc');
  3. $rss = fetch_rss('http://www.newsforge.com/index.rss');
  4.  
  5. echo "<a href=".$rss->channel['link']."><B>".$rss->channel[ 'title']."</B></a>";
  6. foreach ($rss->items as $item) {
  7. $href = $item['link'];
  8. $title = $item['title'];
  9. $desc = $item['description'];
  10. echo "<P><a href=$href>$title</a><BR>";
  11. if($desc)
  12. echo $desc;
  13. }
  14. ?>

Report this snippet  

You need to login to post a comment.