array(348.75, 360), 'N' => array(0, 11.25), 'NNE' => array(11.25, 33.75), 'NE' => array(33.75, 56.25), 'ENE' => array(56.25, 78.75), 'E' => array(78.75, 101.25), 'ESE' => array(101.25, 123.75), 'SE' => array(123.75, 146.25), 'SSE' => array(146.25, 168.75), 'S' => array(168.75, 191.25), 'SSW' => array(191.25, 213.75), 'SW' => array(213.75, 236.25), 'WSW' => array(236.25, 258.75), 'W' => array(258.75, 281.25), 'WNW' => array(281.25, 303.75), 'NW' => array(303.75, 326.25), 'NNW' => array(326.25, 348.75) ); foreach ($cardinalDirections as $dir => $angles) { if ($deg >= $angles[0] && $deg < $angles[1]) { $cardinal = $dir; } } return $cardinal; } function getJson($url) { // cache files are created like cache/abcdef123456... $cacheFile = 'cache' . DIRECTORY_SEPARATOR . md5($url); if (file_exists($cacheFile)) { #$fh = fopen($cacheFile, 'r'); #$cacheTime = trim(fgets($fh)); $cacheTime = filemtime($cacheFile); // if data was cached recently, return cached data if ($cacheTime > strtotime('-5 minutes')) { return $cacheFile ; } // save new cache file $filesave = file_get_contents($url); file_put_contents($cacheFile, $filesave); }else{ $filesave = file_get_contents($url); file_put_contents($cacheFile, $filesave); } return $cacheFile ; } function psIsSameDay($ts1,$ts2){ $f = false; if ( strftime("%e", $ts1) == strftime("%e", $ts2)) { $f = true; } #echo strftime("%e", $ts1) ."=".strftime("%e", $ts2)."
"; return $f; } setlocale(LC_ALL, 'it_IT.UTF-8'); date_default_timezone_set('Europe/Rome'); ?> '; for ($x = 0; $x <= 11; $x++) { if ($data["daypart"][0]["iconCode"][$x]!=null){ echo '
'; echo '
'.$data["daypart"][0]["daypartName"][$x].'
'; echo '
'.$data["daypart"][0]["temperature"][$x].'°
'; echo '
'.$data["daypart"][0]["relativeHumidity"][$x].'% '.$data["daypart"][0]["precipChance"][$x].'%
'; echo ' '.$data["daypart"][0]["windDirectionCardinal"][$x]." ".$data["daypart"][0]["windSpeed"][$x]." Km/h
"; echo "
"; } } ?>
'; for ($x = 0; $x <= 6; $x++) { echo '
'.'
'; echo '
'.ucfirst(strftime("%a %e ", strtotime($data['data_day']['time'][$x])))."
"; echo '
'.round($data["data_day"]["temperature_max"][$x])."° ".round($data["data_day"]["temperature_min"][$x]).'°
'; echo '
'.$data["data_day"]["relativehumidity_mean"][$x].'% '.$data["data_day"]["precipitation_probability"][$x].'%
'; echo ' '.$data["data_day"]["winddirection"][$x]." ".round($data["data_day"]["windspeed_mean"][$x])." Km/h
"; echo "
"; } } ?>
'; for ($x = 0; $x <= 6; $x++) { echo '
'; echo '
'.ucfirst(strftime("%a %e ", $data["daily"]["data"][$x]["time"]))."
"; echo '
'.round($data["daily"]["data"][$x]["temperatureHigh"])."°-".round($data["daily"]["data"][$x]["temperatureLow"]).'°
'; echo '
'.($data["daily"]["data"][$x]["humidity"]*100).'% '.round($data["daily"]["data"][$x]["precipProbability"]).'%
'; echo ' '.wind_cardinals($data["daily"]["data"][$x]["windBearing"]) .' '. round($data["daily"]["data"][$x]["windSpeed"])." Km/h
"; echo "
"; } ?>
'; $time1= $data["hourly"]["data"][0]["time"]; echo '
'; echo '
'.ucfirst(strftime("%A",$time1)).'
'; foreach ($data["hourly"]["data"] as $name) { $time2=$name["time"]; echo '

'; echo ''.ucfirst(strftime("%H:%M", $name["time"])); echo '
'.round($name["temperature"]).'° '; echo '
'.($name["humidity"]*100).'%
'.round($name["precipProbability"]).'% '; echo '
'.wind_cardinals($name["windBearing"]) .'
'. round($name["windSpeed"])." Km/h
"; #echo "
"; if (psIsSameDay($time1,$time2)) { echo ""; } else { $time1=$name["time"]; echo '
'.ucfirst(strftime("%A",$time2)).'
'; } } ?>
'; $time1= $data["list"][0]["dt"]; echo '
'; echo '
'.ucfirst(strftime("%A",$time1)).'
'; foreach ($data["list"] as $name) { $time2=$name["dt"]; echo '

'; echo ''.ucfirst(strftime("%H:%M", $name["dt"])); #echo $name["weather"][0]["description"]." "; echo '
'.round($name["main"]["temp"]).'° '; echo '
'.$name["main"]["humidity"].'% '; echo '
'.$name["clouds"]["all"]."% "; echo '
'.wind_cardinals($name["wind"]["deg"])."
".round($name["wind"]["speed"]*3.6)." km/h
"; #echo "
"; if (psIsSameDay($time1,$time2)) { echo ""; } else { $time1=$name["dt"]; echo '
'.ucfirst(strftime("%A",$time2)).'
'; } } ?>

Previsioni Meteo Gualdo Tadino

Nella sezione sottostante troverai diverse previsioni metereologiche per la città di Gualdo Tadino.

Grazie alle api gratuite rilasciate dai Wunderground,Meteoblue,Darksky,Openweather.