![]() The API is REST-based, lookup requests are made using straightforward HTTP GET URLs, and results are returned in lightweight JSON or XML format within a matter of a few milliseconds. For each IP address processed, the API returns more than 45 unique data points, such as location data, connection data, ISP information, time zone, currency, and security assessment data. Ipapi provides an easy-to-use API interface allowing customers to look at various pieces of information IPv4 and IPv6 addresses are associated with. ![]() You can access this API with multiple languages through an HTTP request. is a very useful online tool/service that exists to resolve IPs to country codes/names. In this article, I will share with you 5 of the most awesome and free GeoIP databases that you can access nowadays. ![]() According to the type of implementation, you may read this information either from an API over HTTP or the specific GeoIP databases to obtain this information in JSON or XML format. Many alternatives to access information of this kind allow you to obtain as well more specific information as the city, state, province, local currency, latitude and longitude, company detail, ISP lookup (internet service provider), language, zip code, country calling code, time zone, current time, sunset and sunrise time, moonset and moonrise time from any provided IPv4 and IPv6 address. country_groupings addon for i, s := range res.GeoIP refers to the method of obtaining the geographic location of a specific device by its IP. Printf( "Geotargeting => Metro: %s \n", res. Printf( "Country => Language => Name: %s \n", res. Printf( "Country => Language => Code: %s \n", res. Printf( "Country => Currency => Symbol: %s \n", res. Printf( "Country => Currency => Name: %s \n", res. Printf( "Country => Currency => Code: %s \n", res. Printf( "Country => IddCode: %s \n", res. Printf( "Country => Population: %s \n", res. Printf( "Country => TotalArea: %s \n", res. Printf( "Country => Capital: %s \n", res. Printf( "Country => Demonym: %s \n", res. Printf( "Country => NumericCode: %s \n", res. Printf( "Country => Alpha3Code: %s \n", res. Printf( "Continent => Hemisphere: %+v \n", res. Printf( "WeatherStationName: %s \n", res. Printf( "WeatherStationCode: %s \n", res. "/ip2location/ip2location-go/v9" "fmt"Īpikey := "YOUR_API_KEY" apipackage := "WS25" usessl := true addon := "continent,country,region,city,geotargeting,country_groupings,time_zone_info" // leave blank if no need lang := "en" // leave blank if no need ws, err := ip2location. This method returns the web service credit balance in an object. This method returns an object containing the geolocation info. } QUERY USING THE IP2LOCATION WEB SERVICE Methods Printf( "api version: %s \n", ip2location. Printf( "weatherstationname: %s \n", results. Printf( "weatherstationcode: %s \n", results. OpenDB( "./IP-COUNTRY-REGION-CITY-LATITUDE-LONGITUDE-ZIPCODE-TIMEZONE-ISP-DOMAIN-NETSPEED-AREACODE-WEATHER-MOBILE-ELEVATION-USAGETYPE-ADDRESSTYPE-CATEGORY.BIN") "fmt" "/ip2location/ip2location-go/v9"ĭb, err := ip2location. 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 Commercial BIN Data (Comprehensive):.This package requires IP2Location BIN data file to function. If you don't have an existing API key, you can subscribe for one at the below: The paid databases are available at under Premium subscription package.Īs an alternative, this package can also call the IP2Location Web Service. 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, 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.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |