?
Solved

Script for displaying rss on a web page

Posted on 2007-07-27
5
Medium Priority
?
221 Views
Last Modified: 2013-11-18
0
Comment
Question by:scml
  • 3
5 Comments
 
LVL 2

Expert Comment

by:coreyward
ID: 19582608
You might want to look into Magpie. It's quite suited for this job.

http://magpierss.sourceforge.net/
0
 

Author Comment

by:scml
ID: 19584716
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
 
LVL 2

Expert Comment

by:coreyward
ID: 19587158
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
 
LVL 8

Expert Comment

by:jawahar_prasad
ID: 19587159
0
 
LVL 2

Accepted Solution

by:
coreyward earned 375 total points
ID: 19587169
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

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Create a Windows 10 custom Image with custom task bar and custom start menu using XML for deployment.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
Suggested Courses
Course of the Month13 days, 17 hours left to enroll

807 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