API を使用して別の場所をシミュレートしようとすると、REQUEST_DENIED エラーが発生します。API ドキュメントのサンプル パラメータは機能しますが、別の緯度と経度の座標を使用すると、REQUEST_DENIED としてバウンスします。1週間ほど前から稼働していました。どうすればいいですか?
PHP のコード:
……////
$url = "https://maps.googleapis.com/maps/api/place/search/json?location=".$latitude.",
".$longitude."&radius=100&sensor=false&key=".$key."";
// Open the Curl session
$session = curl_init($url);
// If it's a POST, put the POST data in the body
//if ($_POST['path']) {
$postvars = '';
while ($element = current($_GET)) {
$postvars .= urlencode(key($_GET)).'='.urlencode($element).'&';
next($_GET);
}
curl_setopt ($session, CURLOPT_POST, true);
curl_setopt ($session, CURLOPT_POSTFIELDS, $postvars);
//}
// Don't return HTTP headers. Do return the contents of the call
curl_setopt($session, CURLOPT_HEADER, false);
curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
curl_setopt($session, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
//curl_setopt($session, CURLOPT_USERPWD, $username.':'.urldecode($password));
// Make the call
$json = curl_exec($session);