Personal Loans - Loan - Magazine Subscriptions - Debt Help - Loans

PDA

View Full Version : Very Simple PHP5 RSS Feed Reader.


philej
Dec 7th 2005, 8:58 pm
I was playing with RSS feeds in PHP5 and found this to be very cool. :)

This simple function will print out a linked title for every item in your feed.


// $location = URL of feed.
function load_xml_feed($location)
{
$feedXml = simplexml_load_file($location);
foreach ($feedXml->channel->item as $article)
{
print '<a href="' . (string)$article->link . '">' . (string)$article->title . '</a><br>';
}
}

ciwee
Nov 24th 2006, 6:13 am
I found your post at google.com man
exactly what I was searching for
Cheers.

ciwee
Nov 24th 2006, 6:31 am
Actually I thought it was a PHP5 native method! what library should I download to use it