I'm trying to use the weatherbug API, but seem to be stuck quite early in the proceedings.
The [very simple] code I tried:
function weather_widget($apikey, $zipcode) {
$url = "http://$apikey.api.wxbug.net/getLiveWeatherRSS.aspx?ACode=$apikey&zipcode=$zipcode&unittype=0&outputtype=1";
$contents = file_get_contents($url);
$doc = new DOMDocument();
$doc->loadXML($contents);
return $doc->getElementsByTagName('aws:weather');
}
var_dump(weather_widget($key, $code));
This produced:
object(DOMNodeList)#2 (0) { }
Does XML DOM not work with at tagname that contains :'s?