Ip2location api
This method returns the web service credit balance in an object.Īddon := "continent,country,region,city,geotargeting,country_groupings,time_zone_info" // leave blank if no need This method returns an object containing the geolocation info. QUERY USING THE IP2LOCATION WEB SERVICE Methods "/ip2location/ip2location-go/v9"ĭb, err := ip2location.OpenDB("./IP-COUNTRY-REGION-CITY-LATITUDE-LONGITUDE-ZIPCODE-TIMEZONE-ISP-DOMAIN-NETSPEED-AREACODE-WEATHER-MOBILE-ELEVATION-USAGETYPE-ADDRESSTYPE-CATEGORY.BIN")įmt.Printf("country_short: %s\n", results.Country_short)įmt.Printf("country_long: %s\n", results.Country_long)įmt.Printf("region: %s\n", results.Region)įmt.Printf("latitude: %f\n", results.Latitude)įmt.Printf("longitude: %f\n", results.Longitude)įmt.Printf("domain: %s\n", results.Domain)įmt.Printf("zipcode: %s\n", results.Zipcode)įmt.Printf("timezone: %s\n", results.Timezone)įmt.Printf("netspeed: %s\n", results.Netspeed)įmt.Printf("iddcode: %s\n", results.Iddcode)įmt.Printf("areacode: %s\n", results.Areacode)įmt.Printf("weatherstationcode: %s\n", results.Weatherstationcode)įmt.Printf("weatherstationname: %s\n", results.Weatherstationname)įmt.Printf("mobilebrand: %s\n", results.Mobilebrand)įmt.Printf("elevation: %f\n", results.Elevation)įmt.Printf("usagetype: %s\n", results.Usagetype)įmt.Printf("addresstype: %s\n", results.Addresstype)įmt.Printf("category: %s\n", results.Category)įmt.Printf("api version: %s\n", ip2location.Api_version()) Returns the geolocation information in an object. Initialize the package with the BIN file. Methodsīelow are the methods supported in this package. Use the IPv6 BIN file if you need to query BOTH IPv4 and IPv6 addresses. Use the IPv4 BIN file if you just need to query IPv4 addresses.
#IP2LOCATION API FREE#
Free LITE databases are available at upon registration.
The database will be updated in monthly basis for the greater accuracy.
#IP2LOCATION API PASSWORD#
prevent password sharing and abuse of service.analyze your web server logs to determine the countries of your visitors.select the geographically closest mirror.This package can be used in many types of projects such as: It supports both IP address in IPv4 and IPv6.
#IP2LOCATION API ZIP#
This database simply contains IP blocks as keys, and other information such as country, region, city, latitude, longitude, ZIP code, time zone, ISP, domain name, connection type, IDD code, area code, weather station code, station name, mcc, mnc, mobile brand, elevation, usage type, address type and IAB category as values. This package uses a file based database available at. This Go package provides a fast lookup of country, region, city, latitude, longitude, ZIP code, time zone, ISP, domain name, connection type, IDD code, area code, weather station code, station name, mcc, mnc, mobile brand, elevation, usage type, address type and IAB category from IP address by using IP2Location database.