I want to get timeZoneId using googleapis url. I want this url return me json response to parse it later and insert lat and long in my database. It works fine when it's not a googlemap url but i have the famous "request_denied" error when I use this kind of url in my code:
How to get json in url from google, I want to get timezone from latitude, longitude, and timestamp
I have tried get data from URL with file_get_contents.
$json_url = 'https://maps.googleapis.com/maps/api/timezone/json?location=39.6034810,-119.6822510×tamp=1331766000&sensor=false';
$json = file_get_contents($json_url);
$obj = json_decode($json);
echo $obj->timeZoneId;
But it doesn't work. It alwy return "status" : "REQUEST_DENIED" Thanks any got a tip.
Update
thank for all :) i checked in php extention-> php_openssl and it work