Хочу показать погоду с гугла. Нашел скрипт разбивки хмл с погодой. Хочу показать это на сайте. Но что-то явно не так, и видимо с кавычками. А на серваке отрубили показ ошибок, и я не пойму что и где именно не так.
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;
}