i'm using an API, which creates a JSON file when the python script is executed, so i've tried to use exec to run the python script and thne retrieve the json. However the python script does not seem to execute. What am i doing wrong? i'm trying it on a apache using MAMP
exec('python http://localhost:8888/examples/recent_matches_to_json.py');
$json = file_get_contents('http://localhost:8888/examples/recent_matches.json');
$obj = json_decode($json);
var_dump($obj->recent, true);
exec('PATH TO YOUR SCRIPT');absolute pathof the file.