eararaldor Posted March 23, 2007 Share Posted March 23, 2007 I'm making this script which reads of the BBC RSS weather <?php /* Uses a REST-style interface to www.weather.com to display the current data in a location. */ function xml_via_proxy ($url) { $context = stream_context_create( array('http'=> array('proxy'=>'cache.uwe.ac.uk:8080') )); $contents = file_get_contents($url, false, $context); return simplexml_load_string($contents); }; $weather = xml_via_proxy("http://feeds.bbc.co.uk/weather/feeds/rss/5day/world/0105.xml"); $description = $weather->rss->channel->item->description; ?> <table border="1"> <h1>EALA</h1> <tr><td>Description</td><td><?php print $description ?></td></tr> </table> Unfortunatly it currently isnt displaying anything. Have I got my nodes mixed up or somthing? Link to comment https://forums.phpfreaks.com/topic/43909-php-weather-rss-script/ Share on other sites More sharing options...
eararaldor Posted March 23, 2007 Author Share Posted March 23, 2007 Problem solved justed removed the rss--> Link to comment https://forums.phpfreaks.com/topic/43909-php-weather-rss-script/#findComment-213191 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.