I have a PHP script which uses cURL to retrieve maps from Google. Until yesterday it was working fine. Now, every once in while I get a curl error: "Couldn't resolve host 'maps.google.com'". Some of the time it works, some of the time it doesn't.
Here is a short script that reproduces the problem:
Sometimes it returns a map, sometimes it returns the following error:
I wonder if this is related to the problems absolut has been having lately. Any ideas?
Here is a short script that reproduces the problem:
Code:
<?php
/*
* [URL]http://belltown.x10hosting.com/test.php[/URL]
*/
$url = "[URL]http://maps.google.com/maps/api/staticmap[/URL]?".
"center=seattle,wa&".
"zoom=13&".
"size=640x640&".
"maptype=roadmap&".
"format=jpg&".
"mobile=true&".
"sensor=false";
if (($c = curl_init ($url)) === false) die ("curl_init error: ".curl_error ($c));
if (curl_exec ($c) === false) die ("curl_exec error: ".curl_error ($c));
curl_close ($c);
?>
Sometimes it returns a map, sometimes it returns the following error:
Code:
curl_exec error: Couldn't resolve host 'maps.google.com'
I wonder if this is related to the problems absolut has been having lately. Any ideas?