Script for displaying rss on a web page

scmlAsked:
Who is Participating?
 
coreywardConnect With a Mentor Commented:
Here's a simple script that might help point you in the right direction:


<?

require_once 'rss_fetch.inc';

$urls = array ('http://www.lemonde.fr/rss/sequence/0,2-3208,1-0,0.xml', 'http://www.cyberpresse.ca/apps/pbcs.dll/section?Category=CPRSS&profile=1019&mime=xml&cacheid=1019', 'http://www.cyberpresse.ca/apps/pbcs.dll/section?Category=CPRSS§ion=cpblogues08&mime=xml&cacheid=cpblogues08');

echo "<table><tr>";
foreach ($urls as $feedurl) {
  echo "<td>";
  $rss = fetch_rss($feedurl);

  echo "Site: ", $rss->channel['title'], "<br>";

  foreach ($rss->items as $item ) {
        $title = $item[title];
        $url   = $item[link];
        echo "<a href=$url>$title</a></li><br>";
  }
  echo "</td>";
}
echo "</tr></table>";

?>
0
 
coreywardCommented:
You might want to look into Magpie. It's quite suited for this job.

http://magpierss.sourceforge.net/
0
 
scmlAuthor Commented:
Sorry but this doesn't tell me how to display rss in a  3 columns table.
The reason I came here at EE is that I have been looking at many many files, doing test after test and being unfamiliar with script languages, without success. I already had magpierss but I'm tired of digging.

If you know that magpierss can do the job then please show me the code to display rss feeds in a 3 columns table.

thanks

scml
0
 
coreywardCommented:
You're probably better off hiring a developer. Maybe I'm just a bit too conservative here, but I don't think EE is where you come to have people write up scripts for you for free.

You'll need to learn about how RSS feeds work, and you'll need to know how to write HTML, all before you can even begin to dive into the PHP. The PHP part is actually really simple, but you have to know what you want. Magpie will only read the RSS for you and parse it. It's up to you to figure out where you want that data.
0
 
jawahar_prasadCommented:
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.