ip2location-resty
IP2Location geolocation library for OpenResty
$ opm get ip2location/ip2location-resty
IP2Location OpenResty Package
[!OPM Version](https://opm.openresty.org/package/ip2location/ip2location-resty/)
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. This package uses a file based database available at IP2Location.com. 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), autonomous system (AS), AS domain, AS usage type and AS CIDR as values. It supports both IP address in IPv4 and IPv6.
This package can be used in many types of projects such as:
select the geographically closest mirror
analyze your web server logs to determine the countries of your visitors
credit card fraud detection
software export controls
display native language and currency
prevent password sharing and abuse of service
geotargeting in advertisement
The database will be updated on a monthly basis for greater accuracy. Free LITE databases are available at https://lite.ip2location.com/ upon registration.
The paid databases are available at https://www.ip2location.com under Premium subscription package.
Developer Documentation
To learn more about installation, usage, and code examples, please visit the developer documentation at https://ip2location-resty.readthedocs.io/en/latest/.
Authors
IP2Location.com
License
mit
Dependencies
ledgetech/lua-resty-http, xiangnanscu/lua-resty-ipmatcher, fffonion/lua-resty-openssl, openresty >= 1.19.9.1
Versions
-
IP2Location geolocation library for OpenResty 2025-09-04 07:13:03
-
IP2Location geolocation library for OpenResty 2024-12-12 02:45:42
-
IP2Location geolocation library for OpenResty 2023-04-13 05:04:51
-
IP2Location geolocation library for OpenResty 2023-03-07 06:17:53
-
IP2Location geolocation library for OpenResty 2022-07-26 07:42:57
-
IP2Location geolocation library for OpenResty 2022-07-05 07:55:17
-
IP2Location geolocation library for OpenResty 2022-07-05 06:39:34
-
IP2Location geolocation library for OpenResty 2021-12-22 02:55:38