zoukankan      html  css  js  c++  java
  • 通过IP地址查询国家、城市、所有者等信息

    程序调用地址:

    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>
  • 相关阅读:
    解决 未能为数据库 '数据库用户名' 中的对象 '表名' 分配空间,因为文件组 'PRIMARY' 已满
    获取一个目录下文件扩展名为txt或htm或html的文件的几种方法
    由于 Web 服务器上的“ISAPI 和 CGI 限制”列表设置,无法提供您请求的页面
    图解C#创建SqlServer MD5 加密函数
    SqlServer 日期转换 所有格式
    使用SoapHeader对WebService进行身份验证
    禁用文本框粘贴功能
    去除 以下文件中的行尾不一致,要将行尾标准化吗 的提示
    程序锁定windows系统以及调用其它系统对话框,如控制面板,重启系统
    yakuake shell
  • 原文地址:https://www.cnblogs.com/jiangshiyong/p/2851389.html
Copyright © 2011-2022 走看看