Logo

Latest News Headlines

Latest News Headlines

by / Comments Off / 4396 View / July 30, 2008

include_once $_SERVER['DOCUMENT_ROOT'] . '/inc/simplepie.inc';
$feed = new SimplePie();
$feed->set_feed_url(array(
‘http://feeds.feedburner.com/MombasaInfoNews’,
‘http://api.bing.com/rss.aspx?Source=News&Market=en-CA&Version=2.0&Query=mombasa’,
‘http://pipes.yahoo.com/pipes/pipe.run?_id=e4ab7197f0b8b85dbee4c1f7aa68cbba&_render=rss’,
));
$feed->set_cache_location($_SERVER['DOCUMENT_ROOT'] . ‘/inc/cache/’);
$feed->enable_cache(true);
$feed->set_cache_duration(999999999);
$feed->set_timeout(-1);
$feed->strip_htmltags(array(‘img’,’embed’,’center’,’strong’,’ul’,’li’,’div’,’p’,’a’,’br’));
$feed->init();

if(!empty($feed)):
$maxitems = $feed->get_item_quantity(10);
$feed_items = $feed->get_items(0, $maxitems);
endif;
?>