在Google地图API中对IP地址进行地理编码
答
该功能不是由Google提供的。然而,现代的浏览器支持HTML5的地理位置,让你在JavaScript代码的功能: https://developers.google.com/maps/articles/geolocation
目前,谷歌并不没有直接提供这种能力。
答
您可以使用下面的代码进行地址解析的IP地址:
function functionname(Your IP Here)
{
$ip = $ClientIP;
$json = file_get_contents("http://api.easyjquery.com/ips/?ip=".$ip."&full=true");
$json = json_decode($json,true);
return $json;
}
感谢。是依靠“现代”浏览器是最简单的解决方案。 – 2012-08-24 14:16:34