----BBC News----

load('http://feeds.bbci.co.uk/news/world/asia/india/rss.xml'); //Change RSS feed link as required $feed = array(); foreach ($rss->getElementsByTagName('item') as $node) { $item = array ( 'title' => $node->getElementsByTagName('title')->item(0)->nodeValue, 'desc' => $node->getElementsByTagName('description')->item(0)->nodeValue, 'date' => $node->getElementsByTagName('pubDate')->item(0)->nodeValue, ); array_push($feed, $item); } $limit = 3; // Change this to change the number of posts displayed for($x=0;$x<$limit;$x++) { $title = str_replace(' & ', ' & ', $feed[$x]['title']); $description = $feed[$x]['desc']; $date = date('j F', strtotime($feed[$x]['date'])); //Change the below echo statements to alter the display format echo '

'.$title.'

'; echo '

'.$date.'

'; echo '

'.strip_tags($description, '

').'

--------

'; } ?>

----BBC Weather - Chennai, India----

load('http://open.live.bbc.co.uk/weather/feeds/en/1264527/observations.rss'); //Change the RSS feed link as required. $feed = array(); foreach ($rss->getElementsByTagName('item') as $node) { $item = array ( 'title' => $node->getElementsByTagName('title')->item(0)->nodeValue, 'desc' => $node->getElementsByTagName('description')->item(0)->nodeValue, 'date' => $node->getElementsByTagName('pubDate')->item(0)->nodeValue, ); array_push($feed, $item); } $limit = 1; // CHange this to change the number of posts for($x=0;$x<$limit;$x++) { $title = str_replace(' & ', ' & ', $feed[$x]['title']); $description = $feed[$x]['desc']; $date = date('j F', strtotime($feed[$x]['date'])); //Change the below echo statements to alter the display format echo '

'.$title.'

'; echo '

'.$date.'

'; echo '

'.strip_tags($description, '

').'

--------

'; } ?>