Files
citrus-cms/app/Functions/temperature.php
T
2026-04-28 21:14:25 +03:00

9 lines
321 B
PHP

<?php function temperature($lat, $lng) {
//55.581972
//37.0559091
$lat = "55.581972";
$lng = "37.0559091";
$json = j(file_get_contents("https://api.openweathermap.org/data/2.5/weather?lat=$lat&lon=$lng&appid=5556bfdb8646e41911f33a956dba56ed&units=metric"));
return $json['main']['temp'];
} ?>