/* Konfiguration*/
$ort = "schlanders";
$symbols_dir = "https://wetter.trendstudio.it/weather/images/";
$config['language'] = "de";
/**/
$texts["WEATHER_TEMP_MIN"] = "Min: ";
$texts["WEATHER_TEMP_MAX"] = "Max: ";
$url = "https://wetter.trendstudio.it/weather/export_api.php?token=kjdshfauKjjUSNFUUjjasf";
$ch = curl_init($url);
mb_internal_encoding('UTF-8');
mb_http_output('UTF-8');
mb_http_input('UTF-8');
mb_language('uni');
mb_regex_encoding('UTF-8');
ob_start('mb_output_handler');
curl_setopt($ch,CURLOPT_HEADER,$cHeader);
curl_setopt($ch,CURLOPT_POST,cPost);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
$data = curl_exec($ch);
curl_close($ch);
function toArray(SimpleXMLElement $xml) {
$array = (array)$xml;
foreach ( array_slice($array, 0) as $key => $value ) {
if ( $value instanceof SimpleXMLElement ) {
$array[$key] = empty($value) ? NULL : toArray($value);
}
}
return $array;
}
$xml = simplexml_load_string(utf8_encode(html_entity_decode($data)));
$wetterdaten = toArray($xml);
switch ($config['language']) {
case "de":
$wetter_lang_str = "_german";
break;
case "it":
$wetter_lang_str = "_italian";
break;
case "en":
$wetter_lang_str = "_english";
break;
default:
$wetter_lang_str = "_german";
break;
}
?>
Meteo - Casa Erlengrund - Agriturismo - Coldrano - Val Venosta - Alto Adige
if (!$wetterdaten) { ?>
Non ci sono dati meteo
} else {
$weather_day = "today";
$weather_day_short = "today";
if (!empty($wetterdaten['weather_tomorrow_german'])) {
$tomorrow = true;
$evolution_days = 2;
} else {
$tomorrow = false;
$evolution_days = 1;
}
?>
| |
|
| | |
if ($tomorrow) { ?>
| |
|
| | |
} ?>
} ?>