通过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 协议对操作进行测试,请单击“调用”按钮。
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>