几个Ip数据库代理

新浪:http://int.dpool.sina.com.cn/iplookup/iplookup.php?format=js 


返回数据:var remote_ip_info = {"ret":1,"start":"27.16.0.0","end":"27.19.255.255","country":"\u4e2d\u56fd","province":"\u6e56\u5317","city":"\u6b66\u6c49","district":"","isp":"\u7535\u4fe1","type":"","desc":""}


调用办法:<script src="http://int.dpool.sina.com.cn/iplookup/iplookup.php?format=js" type="text/javascript"></script<script language="javascript">document.write(remote_ip_info.city);</script>


此接口貌似本能机能返回IP对应的国度省市,IP地址貌似取不到




新浪:http://counter.sina.com.cn/ip


返回数据:var ILData = new Array("27.19.69.47","保存地址", "", "", ""); if (typeof(ILData_callback) != "undefined") { ILData_callback(); }


调用办法:同上,document.write(ILData[0])


该接口可以可以查询指定IP的信息,只须要加上ip参数即可


例如:http://counter.sina.com.cn/ip?ip=119.75.217.56


返回数据:var ILData = new Array("119.75.217.56","中国", "北京市", "(百度公司)", "网通"); if (typeof(ILData_callback) != "undefined") { ILData_callback(); }


此接口返回的是一个数组,包含5个元素:IP地址、国度、省市、所属单位、办事商




有道:http://www.youdao.com/smartresult-xml/search.s


查询ip参数:?type=q&ip=119.75.217.56


返回数据:119.75.217.56 北京市 百度公司


查询手机号参数:?type=mobile&q=13387617842


返回数据:13387617842 湖北 武汉



ASP抓取:

// 使用第三方接口来查询IP所对应的省份
            //LoginIp = "122.235.140.99";
            WebClient WebGet = new WebClient();
            string result = WebGet.DownloadString("http://int.dpool.sina.com.cn/iplookup/iplookup.php?format=js&ip=" + LoginIp);
            result = result.Substring("var remote_ip_info =".Length);


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值