【发布时间】:2012-09-22 14:04:13
【问题描述】:
我正在使用 curl 获取特定位置的纬度和经度。即使到今天早上我也得到了正确的回应。但现在我得到了一些状态,比如“OVER_QUERY_LIMIT”。如果我从不同的文件运行相同的代码,那么它就可以工作。 我的代码是这样的:
$last_url = "http://maps.google.com/maps/api/geocode/json? address=44+Church+st++Parramatta+2150+Australia&sensor=false";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $last_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
/*curl_setopt($ch, CURLOPT_PROXYPORT, 3128);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);*/
$response = curl_exec($ch);
//echo "++++++++++";
echo $response;
curl_close($ch);
$output = json_decode($response);
echo $lat = $output->results[0]->geometry->location->lat;
echo $long = $output->results[0]->geometry->location->lng;
请帮帮我。
【问题讨论】: