Ip2LocationWebService


Click here for a complete list of operations.

IP2Location

Test

To test the operation using the HTTP POST protocol, click the 'Invoke' button.
Parameter Value
IP:
LICENSE:

SOAP

The following is a sample SOAP request and response. The placeholders shown need to be replaced with actual values.

POST /ip2locationwebservice.asmx HTTP/1.1
Host: ws.ip2location.com
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://ws.fraudlabs.com/IP2Location"

<?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>
    <IP2Location xmlns="http://ws.fraudlabs.com/">
      <IP>string</IP>
      <LICENSE>string</LICENSE>
    </IP2Location>
  </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>
    <IP2LocationResponse xmlns="http://ws.fraudlabs.com/">
      <IP2LocationResult>
        <COUNTRYCODE>string</COUNTRYCODE>
        <COUNTRYNAME>string</COUNTRYNAME>
        <REGION>string</REGION>
        <CITY>string</CITY>
        <LATITUDE>float</LATITUDE>
        <LONGITUDE>float</LONGITUDE>
        <ZIPCODE>string</ZIPCODE>
        <ISPNAME>string</ISPNAME>
        <DOMAINNAME>string</DOMAINNAME>
        <TIME_ZONE>string</TIME_ZONE>
        <NETSPEED>string</NETSPEED>
        <AREACODE>string</AREACODE>
        <WEATHERSTATION>string</WEATHERSTATION>
        <WEATHERSTATIONCODE>string</WEATHERSTATIONCODE>
        <CREDITSAVAILABLE>string</CREDITSAVAILABLE>
        <MESSAGE>string</MESSAGE>
      </IP2LocationResult>
    </IP2LocationResponse>
  </soap:Body>
</soap:Envelope>

HTTP GET

The following is a sample HTTP GET request and response. The placeholders shown need to be replaced with actual values.

GET /ip2locationwebservice.asmx/IP2Location?IP=string&LICENSE=string HTTP/1.1
Host: ws.ip2location.com
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<IP2LOCATION xmlns="http://ws.fraudlabs.com/">
  <COUNTRYCODE>string</COUNTRYCODE>
  <COUNTRYNAME>string</COUNTRYNAME>
  <REGION>string</REGION>
  <CITY>string</CITY>
  <LATITUDE>float</LATITUDE>
  <LONGITUDE>float</LONGITUDE>
  <ZIPCODE>string</ZIPCODE>
  <ISPNAME>string</ISPNAME>
  <DOMAINNAME>string</DOMAINNAME>
  <TIME_ZONE>string</TIME_ZONE>
  <NETSPEED>string</NETSPEED>
  <AREACODE>string</AREACODE>
  <WEATHERSTATION>string</WEATHERSTATION>
  <WEATHERSTATIONCODE>string</WEATHERSTATIONCODE>
  <CREDITSAVAILABLE>string</CREDITSAVAILABLE>
  <MESSAGE>string</MESSAGE>
</IP2LOCATION>

HTTP POST

The following is a sample HTTP POST request and response. The placeholders shown need to be replaced with actual values.

POST /ip2locationwebservice.asmx/IP2Location HTTP/1.1
Host: ws.ip2location.com
Content-Type: application/x-www-form-urlencoded
Content-Length: length

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

<?xml version="1.0" encoding="utf-8"?>
<IP2LOCATION xmlns="http://ws.fraudlabs.com/">
  <COUNTRYCODE>string</COUNTRYCODE>
  <COUNTRYNAME>string</COUNTRYNAME>
  <REGION>string</REGION>
  <CITY>string</CITY>
  <LATITUDE>float</LATITUDE>
  <LONGITUDE>float</LONGITUDE>
  <ZIPCODE>string</ZIPCODE>
  <ISPNAME>string</ISPNAME>
  <DOMAINNAME>string</DOMAINNAME>
  <TIME_ZONE>string</TIME_ZONE>
  <NETSPEED>string</NETSPEED>
  <AREACODE>string</AREACODE>
  <WEATHERSTATION>string</WEATHERSTATION>
  <WEATHERSTATIONCODE>string</WEATHERSTATIONCODE>
  <CREDITSAVAILABLE>string</CREDITSAVAILABLE>
  <MESSAGE>string</MESSAGE>
</IP2LOCATION>