Total Pageviews

Tuesday, January 8, 2013



Php -  RSS feed into website




     <?php

$feed = file_get_contents('http://samplesite.com/index.rss');
$rss = new SimpleXmlElement($feed);

foreach($rss->channel->item as $values) {
//var_dump($value);
//print_r($value);

//echo "<a href='$value->link' title='$value->title' target='_blank' >" . $value->title . "</a>";

}


?>


TIPS :
 un-cmd var dump and view source .... u will getta good idea to split how u want....
un-cmd the print_r u will geta correct key values of the feed.....

Hope it will be useful this



Follow kvn_krishna on Twitter