Local ip2location = require('ip2location') |Method Name|Description| |-|-| |get_all|Returns the geolocation information in an object.| |get_country_short|Returns the country code.| |get_country_long|Returns the country name.| |get_region|Returns the region name.| |get_city|Returns the city name.| |get_isp|Returns the ISP name.| |get_latitude|Returns the latitude.| |get_longitude|Returns the longitude.| |get_domain|Returns the domain name.| |get_zipcode|Returns the ZIP code.| |get_timezone|Returns the time zone.| |get_netspeed|Returns the net speed.| |get_iddcode|Returns the IDD code.| |get_areacode|Returns the area code.| |get_weatherstationcode|Returns the weather station code.| |get_weatherstationname|Returns the weather station name.| |get_mcc|Returns the mobile country code.| |get_mnc|Returns the mobile network code.| |get_mobilebrand|Returns the mobile brand.| |get_elevation|Returns the elevation in meters.| |get_usagetype|Returns the usage type.| |get_addresstype|Returns the address type.| |get_category|Returns the IAB category.| |get_district|Returns the district name.| |get_asn|Returns the autonomous system number (ASN).| |get_as|Returns the autonomous system (AS).| |close|Closes BIN file and resets metadata.| Usage worker_processes 1 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. Installation opm get ip2location/ip2location-resty QUERY USING THE BIN FILE Dependencies 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 on a monthly basis for greater accuracy. Prevent password sharing and abuse of service This package can be used in many types of projects such as:Īnalyze your web server logs to determine the countries of your visitors 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, IAB category, district, autonomous system number (ASN) and autonomous system (AS) as values. This package uses a file based database available at. The following are some sample sites with custom URL to retrieve the weather information and forecast.This OpenResty 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, IAB category, district, autonomous system number (ASN) and autonomous system (AS) from IP address by using IP2Location database. XML Data Feed (Free for Personal Use or Paid for Commercial use)įor example, if the nearest Weather Station Code for one IP address is AAXX0001 in Aruba. Please refer to their license agreement and contact them if you have any questions regarding XML weather data feed. However, it is possible to collect the weather information by using paid subscription from 3rd-party Web sites such as. It does NOT provide live weather data or forecast data feed. The IP2Location databases supply the nearest Weather Station Codes and Names only.
0 Comments
Leave a Reply. |