Retrieval Yahoo RSS using PHP

Problem:-  Retrieval Yahoo RSS using PHP

Solution:-

<?php 

$url = "http://rss.news.yahoo.com/rss/oddlyenough";
$rss = simplexml_load_file($url);
print "<ul>";
foreach ($rss->channel->item as $value) {
	print "<li><a href='".htmlentities($value->link)."'>".$value->title."</a></li>";
}
print "</ul>";
 ?>

Output:-

Retrieval Yahoo RSS using PHP
Retrieval Yahoo RSS using PHP

Be the first to comment

Leave a Reply

Your email address will not be published.


*