https://api.weatherstack.com/current ? access_key = YOUR_ACCESS_KEY '745b4d73a10b9bed4e26cff89725e714', 'query' => $keyword, ]); $ch = curl_init(sprintf('%s?%s', 'https://api.weatherstack.com/current', $searchQuery)); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); $result = json_decode($response, true); echo "Temperature in $keyword is {$result['current']['temperature']}℃", PHP_EOL; echo "The wind speed in $keyword is {$result['current']['wind_speed']}℃", PHP_EOL; echo "The visibility in $keyword is {$result['current']['visibility']}℃", PHP_EOL; ?>