Geocode API允許每天發送2500個請求,但我的網站在一天內並未發送此類請求。我的代碼是否發送自動請求?Geocode API查詢限制超過
function getmap($addrss,$location,$city){
$address = $addrss.' '.$city.' '.$location;
$prepAddr = urlencode($address);
$geocode=file_get_contents('http://maps.google.com/maps/api/geocode/json?address='.$prepAddr.'&sensor=false');
$output= json_decode($geocode);
$lat = $output->results[0]->geometry->location->lat;
$long = $output->results[0]->geometry->location->lng;
$retval = $lat.'*'.$long;
return $retval;
}
反應過來
[ERROR_MESSAGE] =>您已經超出了您的每日請求限額爲這個API ..... [狀態] => OVER_QUERY_LIMIT)
請提供任何建議。
要知道您的代碼是否正在發送自動請求,您需要知道是什麼調用了'getmap()'函數。 – TZHX
它的簡單功能從頭版調用一次,它不在任何循環中。 – Adas
你使用共享主機?其他人也可能使用地理編碼API。 – Chris