[[?php header("refresh: 10;"); $mycss = ".parent { position: relative; margin: 10px; margin-left:auto; margin-right:auto; width: 100%; height: 400px; } .child1{ position: absolute; width: 100%; height: 100%; top: 0; left: 0; } .child2 { margin: 10px; z-index: 1; } .box { display: flex; justify-content: center; align-items: center; } .compass { align: left; display: block; width: 80px; height: 80px; border-radius: 100%; box-shadow: 0 0 10px rgba(0, 0, 0, 0.85); position: relative; font-family: 'Verdana'; color: #555; text-shadow: 1px 1px 1px white; } .compass:before { font-weight: bold; position: absolute; text-align: center; width: 100%; content: 'N'; font-size: 12px; top: -2px; } .compass .direction { height: 100%; width: 100%; display: block; background: #f2f6f5; background: -moz-linear-gradient(top, #f2f6f5 0%, #cbd5d6 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #f2f6f5), color-stop(100%, #cbd5d6)); background: -webkit-linear-gradient(top, #f2f6f5 0%, #cbd5d6 100%); background: -o-linear-gradient(top, #f2f6f5 0%, #cbd5d6 100%); border-radius: 100%; } .compass .direction p { text-align: center; margin: 0; padding: 0; position: absolute; top: 50%; left: 0; width: 100%; height: 100%; line-height: 80px; display: block; margin-top: -45px; font-size: 20px; font-weight: bold; } .compass .direction p span { display: block; line-height: normal; margin-top: -24px; font-size: 11px; text-transform: uppercase; font-weight: normal; } .compass .arrow { width: 100%; height: 100%; display: block; position: absolute; top: 0; } .compass .arrow:after { content: ''; width: 0; height: 0; border-left: 10px solid transparent; border-right: 10px solid transparent; border-top: 18px solid red; position: absolute; top: -6px; left: 50%; margin-left: -5px; z-index: 99; } .compass .arrow.NNO { transform: rotate(22.5deg); } .compass .arrow.NO { transform: rotate(45deg); } .compass .arrow.ONO { transform: rotate(67.5deg); } .compass .arrow.O { transform: rotate(90deg); } .compass .arrow.OZO { transform: rotate(112.5deg); } .compass .arrow.ZO { transform: rotate(135deg); } .compass .arrow.ZZO { transform: rotate(157.5deg); } .compass .arrow.Z { transform: rotate(180deg); } .compass .arrow.ZZW { transform: rotate(202.5deg); } .compass .arrow.ZW { transform: rotate(225deg); } .compass .arrow.WZW { transform: rotate(247.5deg); } .compass .arrow.W { transform: rotate(270deg); } .compass .arrow.WNW { transform: rotate(292.5deg); } .compass .arrow.NW { transform: rotate(315deg); } .compass .arrow.NNW { transform: rotate(337.5deg); }"; $doc->addStyleDeclaration( $mycss ); $json = file_get_contents('https://api.weather.com/v2/pws/observations/current?apiKey=e1f10a1e78da46f5b10a1e78da96f525&stationId=IVLGKEUL3&numericPrecision=decimal&format=json&units=m'); $data = json_decode($json); $temp = $data->observations[0]->metric->temp; $feeltemp = $data->observations[0]->metric->windChill; $lastupdate = $data->observations[0]->obsTimeLocal; $uv = $data->observations[0]->uv; $winddir = $data->observations[0]->winddir; $humidity = $data->observations[0]->humidity; $windspeed = $data->observations[0]->metric->windSpeed; $windgust = $data->observations[0]->metric->windGust; $preciprate= $data->observations[0]->metric->precipRate; $pressure = round($data->observations[0]->metric->pressure,0); $rainclr = '#3B3B3B'; $oktofly = 'GUNSTIG'; $oktoflyclr ='#007F0E'; $rainimage = 'https://www.bmzc.be/images/BMZC/misc/norain.png'; $tempimage = 'https://www.bmzc.be/images/BMZC/misc/temp.png'; $windimage = 'https://www.bmzc.be/images/BMZC/misc/wind_0.png'; if ($preciprate > 0) { $rainclr = '#D60000'; $oktofly = 'ONGUNSTIG'; $oktoflyclr = $rainclr; $rainimage = 'https://www.bmzc.be/images/BMZC/misc/rain.png'; } if ($windspeed > 15) { $windclr = '#FF6A00'; $oktofly = 'GUNSTIG'; $oktoflyclr = $windclr; } if ($windspeed > 19) { $windclr = '#D60000'; $oktofly = 'ONGUNSTIG'; $oktoflyclr = $windclr; } if ($windspeed > 11) { $windimage = 'https://www.bmzc.be/images/BMZC/misc/wind_1.png'; } if ($windgust > 11) { $windimage = 'https://www.bmzc.be/images/BMZC/misc/wind_1.png'; } if ($windspeed > 25) { $windimage = 'https://www.bmzc.be/images/BMZC/misc/wind_2.png'; } if ($windgust > 25) { $windimage = 'https://www.bmzc.be/images/BMZC/misc/wind_2.png'; } if ($windgust > 19) { $windclr = '#D60000'; $oktofly = 'ONGUNSTIG'; $oktoflyclr = $windclr; } if ($feeltemp > 26) { $tempimage = 'https://www.bmzc.be/images/BMZC/misc/temp_extreme.png'; } if ($feeltemp < 3) { $tempimage = 'https://www.bmzc.be/images/BMZC/misc/temp_freeze.png'; } $directions = array("N", "NNO", "NO", "ONO", "O", "OZO", "ZO", "ZZO", "Z", "ZZW", "ZW", "WZW", "W", "WNW", "NW", "NNW"); $degrees = $winddir * 16 / 360; $degrees = round($degrees, 0); $degrees = ($degrees + 16) % 16; echo "
OMSTANDIGHEDEN : $oktofly | ||
TEMPERATUUR | NEERSLAG | WIND/VLAAG |
mm/u |
$windspeed / $windgust km/u | |
VOCHTIGHEID | LUCHTDRUK | UV index |
![]() |
![]() hPa |
![]() |
"; echo "
";
echo " ";
echo " "; //end Parent
echo "Laatste update: $lastupdate";
echo "![]() ";
echo " "; //end Child 2
echo "$directions[$degrees] |
De getoonde weersinformatie is actueel en gebruikt de waarnemingen door het weerstation van de firma SBR, gesitueerd op 1 km van het vliegterrein.
Deze gegevens worden verzameld en opgevraagd via de website wunderground.com