[php]淘宝IP接口获取方式
2012/8/29 12:59:00 人气 4165 编程语言区// get ip
$$data = json_decode(file_get_contents(‘http://ip.taobao.com/service/getIpInfo.php?ip=202.106.0.20‘));
echo “<pre>“;
print_r($$data);
exit;
/*
stdClass Object
(
[code] => 0
[data] => stdClass Object
(
[country] => 中国
[country_id] => 86
[area] => 华北
[area_id] => 100000
[region] => 北京市
[region_id] => 110000
[city] => 北京市
[city_id] => 110000
[county] =>
[county_id] => -1
[isp] => 联通
[i*id] => 100026
127.0.0.1 => 202.106.0.20
)
)
*/
$$data = json_decode(file_get_contents(‘http://ip.taobao.com/service/getIpInfo.php?ip=202.106.0.20‘));
echo “<pre>“;
print_r($$data);
exit;
/*
stdClass Object
(
[code] => 0
[data] => stdClass Object
(
[country] => 中国
[country_id] => 86
[area] => 华北
[area_id] => 100000
[region] => 北京市
[region_id] => 110000
[city] => 北京市
[city_id] => 110000
[county] =>
[county_id] => -1
[isp] => 联通
[i*id] => 100026
127.0.0.1 => 202.106.0.20
)
)
*/
内信我的用户耐心等待!因为上班特忙!不能即时回复!希望理解!
暂无回复!
发表回复