通过IP地址查询国家、城市、所有者等信息

WebXml.com.cn提供详细的IP地址数据查询服务,包括国家、城市和所有者信息,适用于多种请求方式,并且提供了完整的API文档和技术支持。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

程序调用地址:

http://www.webxml.com.cn/WebServices/IpAddressSearchWebService.asmx?op=getCountryCityByIp

WebXml.com.cn IP地址搜索 WEB 服务包含中国和国外已知的IP地址数据,是目前最完整的IP地址数据,记录数量现已超过37万条并还在不断更新和增加中,因IP地址在不断变化,此IP地址数据查询仅供参考。
此IP地址搜索Web Services请不要用于任何商业目的,若有需要请联系我们,欢迎技术交流。 QQ:8409035
使用本站 WEB 服务请注明或链接本站:http://www.webxml.com.cn/ 感谢大家的支持

 支持下列操作。有关正式定义,请查看服务说明

    • getCountryCityByIp 

      通过输入IP地址查询国家、城市、所有者等信息。没有注明国家的为中国

      输入参数:IP地址(自动替换 " 。" 为 "."),返回数据: 一个一维字符串数组String(1),String(0) = IP地址;String(1) = 查询结果或提示信息

 

    • getGeoIPContext 

      获得您的IP地址和地址信息

      输入参数:无,返回数据: 一个一维字符串数组String(1),String(0) = IP地址;String(1) = 地址信息

 

    • getVersionTime 

      获得本IP地址搜索 WEB 服务的数据库版本更新时间

      输入参数:无,输出参数 String

 

getCountryCityByIp

通过输入IP地址查询国家、城市、所有者等信息。没有注明国家的为中国

输入参数:IP地址(自动替换 " 。" 为 "."),返回数据: 一个一维字符串数组String(1),String(0) = IP地址;String(1) = 查询结果或提示信息

测试

若要使用 HTTP POST 协议对操作进行测试,请单击“调用”按钮。

参数
theIpAddress:
 

SOAP 1.1

以下是 SOAP 1.2 请求和响应示例。所显示的占位符需替换为实际值。

POST /WebServices/IpAddressSearchWebService.asmx HTTP/1.1
Host: www.webxml.com.cn
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://WebXml.com.cn/getCountryCityByIp"

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <getCountryCityByIp xmlns="http://WebXml.com.cn/">
      <theIpAddress>string</theIpAddress>
    </getCountryCityByIp>
  </soap:Body>
</soap:Envelope>
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <getCountryCityByIpResponse xmlns="http://WebXml.com.cn/">
      <getCountryCityByIpResult>
        <string>string</string>
        <string>string</string>
      </getCountryCityByIpResult>
    </getCountryCityByIpResponse>
  </soap:Body>
</soap:Envelope>

SOAP 1.2

以下是 SOAP 1.2 请求和响应示例。所显示的占位符需替换为实际值。

POST /WebServices/IpAddressSearchWebService.asmx HTTP/1.1
Host: www.webxml.com.cn
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <getCountryCityByIp xmlns="http://WebXml.com.cn/">
      <theIpAddress>string</theIpAddress>
    </getCountryCityByIp>
  </soap12:Body>
</soap12:Envelope>
HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <getCountryCityByIpResponse xmlns="http://WebXml.com.cn/">
      <getCountryCityByIpResult>
        <string>string</string>
        <string>string</string>
      </getCountryCityByIpResult>
    </getCountryCityByIpResponse>
  </soap12:Body>
</soap12:Envelope>

HTTP GET

以下是 HTTP GET 请求和响应示例。所显示的占位符需替换为实际值。

GET /WebServices/IpAddressSearchWebService.asmx/getCountryCityByIp?theIpAddress=string HTTP/1.1
Host: www.webxml.com.cn
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<ArrayOfString xmlns="http://WebXml.com.cn/">
  <string>string</string>
  <string>string</string>
</ArrayOfString>

HTTP POST

以下是 HTTP POST 请求和响应示例。所显示的占位符需替换为实际值。

POST /WebServices/IpAddressSearchWebService.asmx/getCountryCityByIp HTTP/1.1
Host: www.webxml.com.cn
Content-Type: application/x-www-form-urlencoded
Content-Length: length

theIpAddress=string
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<ArrayOfString xmlns="http://WebXml.com.cn/">
  <string>string</string>
  <string>string</string>
</ArrayOfString>

转载于:https://www.cnblogs.com/jiangshiyong/archive/2013/01/08/2851389.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值