I want to show the weather from Google. Found a script breakdown hml with the weather. I want to show it on the site. But something is clearly wrong, and apparently with quotes. And on the server they chopped off the display of errors, and I do not understand what and where exactly is wrong.
function getWeather() { $requestAddress = "http://www.google.com/ig/api?weather=Paris"; $xml_str = file_get_contents($requestAddress,0); $xml = new SimplexmlElement($xml_str); $count = 0; $res = ''; $res .="<div id=\"weather\">"; foreach($xml->weather as $item) { foreach($item->forecast_conditions as $new) { $res .= '<div class="weatherIcon">'; $res .= '<img src="http://www.google.com/' .$new->icon['data'] . '"/><br/>'; $res .= $new->day_of_week['data']; $res .= '</div>'; } } $res .="</div>"; return $res; }