PHPize Online / SQLize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
Copy Clear
Copy Format Clear
<?php $city0 = 'Macae'; $city1 = 'Tallinn'; $city2 = 'Oslo'; $city = 'Owerri'; $apiKey='523df554f4e883874873853b897b6da0'; $a=getTemp($city0,$apiKey); print_r($a); function getTemp($city,$apiKey){ $url="https://api.openweathermap.org/data/2.5/weather?q=$city&appid=$apiKey"; $data=file_get_contents($url); return $data; } ?>
Show:  
Copy Clear