Page 1 of 1
Display RSS(XML) in HTML format with PHP...
Posted: Sat Aug 14, 2004 7:24 am
by kevin7
how can i display the RSS of other people's website to my website, i mean display all the news... em... display from xml to html...
any script that doen that, or any idea to write that script?
thank you..
Posted: Sat Aug 14, 2004 7:39 am
by m3mn0n
Posted: Sat Aug 14, 2004 7:53 am
by kevin7
wow... that was too complicated for me... any "already made" RSS parser that can be use directly? thank you
Posted: Sat Aug 14, 2004 9:57 am
by feyd
check hotscripts.com
Posted: Sat Aug 14, 2004 1:22 pm
by yelvington
google php pear rss
to find the appropriate PEAR package.
Or upgrade to PHP5, where you can do this with just a few lines of code.
For an RSS 2.0 feed:
Code: Select all
<?php
$xml = simplexml_load_file('http://onlineathens.com/RSS/news.xml');
foreach($xml->channel->item as $item)
echo "
<li><a href="$item->link">$item->title</a> $item->pubDate</li>\r\n";
?>