Hotfix: weatherRequest getCityName -POST serialize

This commit is contained in:
Divlo
2019-12-29 01:45:04 +01:00
parent 10553b62e7
commit 964d5fcf35
4 changed files with 23 additions and 19 deletions

View File

@ -14,7 +14,7 @@ $_SESSION['LAST_CALL'] = date("Y-m-d h:i:s");
include 'keyVariable.php';
ini_set("allow_url_fopen", 1);
$cityName = $_COOKIE['city'];
$cityName = htmlspecialchars($_POST['city']);
$url = 'https://api.openweathermap.org/data/2.5/weather?q='.$cityName.'&lang=fr&units=metric&appid='.$apiWeather;
$json = file_get_contents($url);
// $obj = json_decode($json);