Tag - 地図

現在位置救う(PHP)

geolocation関数を使用して位置を求め、もし関連の権限とサポートしていないブラウザである場合、ネイバーが提供するAPIを介してアイピーでの位置を求める。 使用前に下記のアドレスにネイバーのAPIキーを受ける。(https://www.ncloud.com/product/applicationService/geoLocation) <? function makeSignature($secretKey, $method, $baseString, $timestamp, $accessKey) { $space = ' '; $newLine = "\n"; $hmac = $method.$space.$baseString.$newLine.$timestamp.$newLine.$accessKey; $signautue = base64_encode(hash_hmac('sha256', $hmac, $secretKey,true)); return $signautue; } if($_POST['order'] == 'geolocation') { $hostNameUrl = 'https://geolocation.apigw.ntruss.com'; $requestUrl= '/geolocation/v2/geoLocation'; $accessKey...