$url = "http://www.geoplugin.net/php.gp?ip=".getIP();
$ary = unserialize(load_url($url));
ip所在縣市
($ary['geoplugin_regionName'] == "")?$ary['geoplugin_countryName']:$ary['geoplugin_regionName']
$url = "http://ip-api.com/json/".getIP();
$json = load_url($url);
$ary = json_decode($json);
stdClass Object
(
[status] => success
[country] => United States
[countryCode] => US
[region] => OH
[regionName] => Ohio
[city] => Columbus
[zip] => 43215
[lat] => 39.9587
[lon] => -82.9987
[timezone] => America/New_York
[isp] => Amazon.com
[org] => Anthropic, PBC
[as] => AS16509 Amazon.com, Inc.
[query] => 216.73.216.163
)