![]() 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. The complete database is available at under subscription package. ![]() ![]() Installation go get /ip2location/ip2location-goĭb, err := ip2location.OpenDB("./IP-COUNTRY-REGION-CITY-LATITUDE-LONGITUDE-ZIPCODE-TIMEZONE-ISP-DOMAIN-NETSPEED-AREACODE-WEATHER-MOBILE-ELEVATION-USAGETYPE.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("api version: %s\n", ip2location.Api_version()) The paid databases are available at under Premium subscription package. Free LITE databases are available at upon registration. The database will be updated in monthly basis for the greater accuracy. 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. 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, and usage type 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, and usage type from IP address by using IP2Location database.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |