$command = 'curl -X GET -H "application/json" -H "X-Api-Key: '.$key.'" https://some-api.com/resource'; exec($command, $output); $array = json_decode($output[0], true);
Using curl in PHP is boring. Let execute a command for