Hi! Could we please enable some services and cookies to improve your experience and our website?
Online Sandbox for SQL and PHP: Write, Run, Test, and Share SQL Queries and PHP Code
<?
$city = 'Onitsha';
$api_key = '523df554f4e883874873853b897b6da0';
$url = "https://api.openweathermap.org/data/2.5/weather?q=$city&appid=$api_key";
$json = file_get_contents($url);
$data = json_decode($json,TRUE);
print_r($data);