Logo

Mombasa Weather Forecast

Mombasa Weather Forecast

by / Comments Off / 45 View / August 30, 2008


Below is the current weather along with forecasts for the next 24 hours:

include_once $_SERVER['DOCUMENT_ROOT'] . '/inc/simplepie.inc';
$url = 'http://rss.wunderground.com/auto/rss_full/global/stations/63820.xml';
$feed = new SimplePie();
$feed->set_cache_location($_SERVER[‘DOCUMENT_ROOT’] . ‘/inc/cache/’);
$feed->set_feed_url($url);
$feed->enable_cache(true);
$feed->set_cache_duration(999999999);
$feed->set_timeout(-1);
$feed->strip_htmltags(array(‘img’,’embed’,’center’,’strong’));
$feed->init();

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

    Sorry, no weather updates.

    ‘;
    else
    foreach ( $feed_items as $item ) : ?>

  • get_title(); ?>get_date() ?>
    get_description(), 0, 260) . ‘…'; ?>