Coding can't access Google Map API request (on WebHosting Hub only)

Avatar
  • Answered
I am using PHP doce on my Webhosting Hub service Website:
'; $url = 'https://maps.googleapis.com/maps/api/geocode/json?address='.$address; echo file_get_contents($url); ?> Please note, I am using an API key on my code but I am not giving you this API for security reasons. But it shoud work with no API key anyway. This code was working fine from many weeks on this serveur but no more since about one week. Located on the server for test here: http://www.prodigemedia.com/google_api.php?address=532+Boulevard+du+S%C3%A9minaire+Nord,+QC+Canada It only gives the address used in the request, no JSON response code. While the exact same code works there (non WebHostinghub Servers): http://box571.bluehost.com/~prodigem/google_api.php?address=532+Boulevard+du+S%C3%A9minaire+Nord,+QC+Canada http://jcroyinc.com/google_api.php?address=532+Boulevard+du+S%C3%A9minaire+Nord,+QC+Canada http://technicomm.qc.ca/google_api.php?address=532+Boulevard+du+S%C3%A9minaire+Nord,+QC+Canada So I think WebHosting Hub (at least on server IP: 192.145.238.196) have a problem to let the request from the server to Google API passed by as it should. Please note that the API key I use is not restricted to any IP nor domain name. Anyway if I test it with the no API key way, I have the same problem (works on other server but not on WebHosting Hub's servers). By the way, I got a chat with technical support at WebHosting Hub and he says that they are advised that their server have issues with Google API.
Avatar
prodigemedia
It's fixed !
Here is Webhosting Hub reply concerning this issue...
---------------------------------------------------------------------------
"I am glad to learn that our Google API is working for you today. The API key was blocked in the firewall it appears, we have unblocked it at this time and there should be no further issues from here, if you are seeing any please let us know so we may check and see if the firewall is cutting them off again."

---------------------------------------------------------------------------
Avatar
prodigemedia
Tested this morning and it works on the server. Waiting for WebHosting Hub updates to know what was happening...
Avatar
anonymous
Hello, That seems weird as with all of my test the code is working. It may be something with that server as which I would suggest contacting their support department and request a server migration. They should accommodate this request with no trouble. Best Regards, TJ Edens