Script for displaying rss on a web page

Posted on 2007-07-27
Last Modified: 2013-11-18
Question by:scml
    LVL 2

    Expert Comment

    You might want to look into Magpie. It's quite suited for this job.

    Author Comment

    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.


    LVL 2

    Expert Comment

    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.
    LVL 8

    Expert Comment

    LVL 2

    Accepted Solution

    Here's a simple script that might help point you in the right direction:


    require_once '';

    $urls = array (',2-3208,1-0,0.xml', '', '');

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


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Suggested Solutions

    I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
    Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL ( several years ago, it seemed like now was a good time to updat…
    Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
    The viewer will learn how to dynamically set the form action using jQuery.

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now