1/7/2024 0 Comments Www ip2location comanalyze 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. out.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. get( "country_name") != null) ? myresult. get( "country_code") != null) ? myresult. IP2LocationWebService ws = new IP2LocationWebService() Returns time zones, DST, GMT offset, sunrise and sunset. Returns metro code based on the ZIP/postal code. Returns region code, name and translations. Returns country codes, country name, flag, capital, total area, population, currency info, language info, IDD, TLD and translations. Returns continent code, name, hemispheres and translations. This method returns the web service credit balance in a JsonObject.īelow are the Addons supported in this class. IPQuery(String IPAddress, String AddOns, String Language) Query IP address and translation language. IPQuery(String IPAddress, String Language) ![]() Open(String APIKey, String Package, boolean UseSSL) } QUERY USING THE IP2LOCATION IP GEOLOCATION WEB SERVICE Methods println( "This BIN does not contain IPv6 data.") println( "Invalid database path.") Įlse if ( "IPV6_NOT_SUPPORTED". println( "Invalid IP address.") Įlse if ( "MISSING_FILE". println( "IP address cannot be blank.") Įlse if ( "INVALID_IP_ADDRESS". IPQuery( ip) Įlse if ( "EMPTY_IP_ADDRESS". this is to initialize with a byte array // Path binpath = Paths.get(binfile) // byte binFileBytes = Files.readAllBytes(binpath) // loc.Open(binFileBytes) IPResult rec = loc. this is to initialize with a BIN file loc. String binfile = "/usr/data/IP-COUNTRY-REGION-CITY-LATITUDE-LONGITUDE-ZIPCODE-TIMEZONE-ISP-DOMAIN-NETSPEED-AREACODE-WEATHER-MOBILE-ELEVATION-USAGETYPE-ADDRESSTYPE-CATEGORY.BIN" ![]() The IP address does not exists in the BIN file. The BIN file path is wrong or the BIN file is unreadable. The query has been successfully performed. These categories are comprised of Tier-1 and Tier-2 (if available) level categories widely used in services like advertising, Internet security and filtering appliances. The domain category is based on IAB Tech Lab Content Taxonomy. IP address types as defined in Internet Protocol version 4 (IPv4) and Internet Protocol version 6 (IPv6). Usage type classification of ISP or company: Name of the nearest weather observation station.Īverage height of city above sea level in meters (m). Special code to identify the nearest weather observation station. The IDD prefix to call the city from another country.Ī varying length number assigned to geographic areas for call between cities. Time zone in UTC (Coordinated Universal Time).ĭomain name associated to IP address range. Two-character country code based on ISO 3166. This method returns results in object.īelow are the result methods. Initialize the component with the byte array containing the BIN file data. Initialize the component and preload the BIN file. It is set to false by default.īelow are the methods supported in this class. This will increase query speed but require more memory. Set to true to enable memory mapped file feature. Jar cf ip2location.jar com/ip2location/ *.class QUERY USING THE BIN FILE Parametersīelow are the parameters to set before using this class. If you don't have an existing API key, you can subscribe for one at the below: Commercial IP2Location IP Geolocation BIN Data: Īs an alternative, this IP Geolocation Java component can also call the IP2Location Web Service.Free IP2Location IP Geolocation BIN Data:.It lookup the IP address from IP2Location BIN Data file. In addition, users can also determine extra useful geolocation information such as latitude, longitude, ZIP code, domain name, time zone, connection speed, IDD code, area code, weather station code, weather station name, MCC, MNC, mobile brand name, elevation, usage type, address type & IAB category. This IP Geolocation Java component allows user to query an IP address for info such as the visitor’s country, region, city, ISP or company name. IP2Location IP Geolocation Java Component
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |