加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

查询IP对应地区的WebService

发布时间:2020-12-17 02:36:40 所属栏目:安全 来源:网络整理
导读:记得网上有许多专门搜索Web Service 提供者的站点,可惜我找了半天才找到了 http://www.xmethods.com/ 这个网站,还是很幸运!一看,哇哈多啊,随便找个 IP2Location IP Address Geolocation Web Service using SOAP ,明白了是可以提供IP查询的WEB Service
记得网上有许多专门搜索Web Service 提供者的站点,可惜我找了半天才找到了 http://www.xmethods.com/这个网站,还是很幸运!一看,哇哈多啊,随便找个 IP2Location IP Address Geolocation Web Service using SOAP,明白了是可以提供IP查询的WEB Service 马上到 http://www.fraudlabs.com/default.aspx注册个KEY(只要E-mail就OK),后到VS.NET2003添加WEB引用 http://ws.ip2location.com/ip2locationwebservice.asmx?wsdl   看提供的方法返回有查询IP,主机的国家,地区,国家,城市,国家代码,域名,纬度,经度,邮编   很好!   代码:   '作者:wgscd(自由奔腾)@ 2005   Dim key As String = "02-E39Y-A27K"'注意自己申请的KEY,这我的    Dim Input As String =textbox1.txt '记录IP    Dim IPlocation As com.ip2location.ws.IP2LOCATION    IPlocation = New com.ip2location.ws.IP2LOCATION    Dim ws1 As com.ip2location.ws.Ip2LocationWebService    ws1 = New com.ip2location.ws.Ip2LocationWebService    IPlocation = ws1.IP2Location(Input,key)    Me.Text = Input    If IPlocation.MESSAGE <> "" Then 'if some ERRO    Label6.Text = "哎呀!出错了。。"    MsgBox(" 错误信息:" & IPlocation.MESSAGE)    Else 'if no ERRO       Dim strResult As String = "国家:" & IPlocation.COUNTRYNAME & vbCrLf & "城市:" & IPlocation.CITY & vbCrLf & "国家代码:" & IPlocation.COUNTRYCODE & vbCrLf & "CREDITSAVAILABLE:" & IPlocation.CREDITSAVAILABLE & vbCrLf & "域名:" & IPlocation.DOMAINNAME & vbCrLf & "ISP名:" & IPlocation.ISPNAME & vbCrLf & "纬度:" & IPlocation.LATITUDE & vbCrLf & "经度:" & IPlocation.LONGITUDE & vbCrLf & "地区:" & IPlocation.REGION & vbCrLf & "邮编:" & IPlocation.ZIPCODE & vbCrLf & vbCrLf & vbCrLf & "--wgscd(自由奔腾)@ 2005--"

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读