Created
January 5, 2013 07:58
-
-
Save mingcheng/4460417 to your computer and use it in GitHub Desktop.
淘宝的 IP 地址请求库
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| http://greencompute.org/instructions.php | |
| 1. 请求接口(GET): | |
| http://ip.taobao.com/service/getIpInfo.php?ip=[ip地址字串] | |
| 2. 响应信息: | |
| (json格式的)国家 、省(自治区或直辖市)、市(县)、运营商 | |
| 3. 返回数据格式: | |
| {"code":0,"data":{"ip":"210.75.225.254","country":"\u4e2d\u56fd","area":"\u534e\u5317", | |
| "region":"\u5317\u4eac\u5e02","city":"\u5317\u4eac\u5e02","county":"","isp":"\u7535\u4fe1", | |
| "country_id":"86","area_id":"100000","region_id":"110000","city_id":"110000", | |
| "county_id":"-1","isp_id":"100017"}} | |
| 其中code的值的含义为,0:成功,1:失败。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment