• Your shopping cart is empty!

Lua Package

This package is the Lua programming language package to support all IP2Location™ database products. It has been optimized for speed and memory utilization. Developers can use the module to query all IP2Location™ binary databases for applications written using the Lua programming language.

Installation

luarocks install ip2location

Sample Codes
ip2location = require('ip2location')

local ip2loc = ip2location:new('IP-COUNTRY-REGION-CITY-LATITUDE-LONGITUDE-ZIPCODE-TIMEZONE-ISP-DOMAIN-NETSPEED-AREACODE-WEATHER-MOBILE-ELEVATION-USAGETYPE.BIN')

local result = ip2loc:get_all('8.8.8.8')

print("country_short: " .. result.country_short)
print("country_long: " .. result.country_long)
print("region: " .. result.region)
print("city: " .. result.city)
print("isp: " .. result.isp)
print("latitude: " .. result.latitude)
print("longitude: " .. result.longitude)
print("domain: " .. result.domain)
print("zipcode: " .. result.zipcode)
print("timezone: " .. result.timezone)
print("netspeed: " .. result.netspeed)
print("iddcode: " .. result.iddcode)
print("areacode: " .. result.areacode)
print("weatherstationcode: " .. result.weatherstationcode)
print("weatherstationname: " .. result.weatherstationname)
print("mcc: " .. result.mcc)
print("mnc: " .. result.mnc)
print("mobilebrand: " .. result.mobilebrand)
print("elevation: " .. result.elevation)
print("usagetype: " .. result.usagetype)
Sample IP2Location Databases (BIN)
Sample Packages IPv4 IPV6
IP2Location DB1 Sample BIN File Download (692.11 kB) Download (350.84 kB)
IP2Location DB2 Sample BIN File Download (36.88 MB) Download (378.66 kB)
IP2Location DB3 Sample BIN File Download (19.16 MB) Download (363.65 kB)
IP2Location DB4 Sample BIN File Download (52.88 MB) Download (388.27 kB)
IP2Location DB5 Sample BIN File Download (29.12 MB) Download (370.18 kB)
IP2Location DB6 Sample BIN File Download (62.43 MB) Download (393.44 kB)
IP2Location DB7 Sample BIN File Download (58.77 MB) Download (398.64 kB)
IP2Location DB8 Sample BIN File Download (68.55 MB) Download (403.55 kB)
IP2Location DB9 Sample BIN File Download (33.54 MB) Download (373.45 kB)
IP2Location DB10 Sample BIN File Download (73.78 MB) Download (408.65 kB)
IP2Location DB11 Sample BIN File Download (34.20 MB) Download (374.17 kB)
IP2Location DB12 Sample BIN File Download (74.42 MB) Download (409.59 kB)
IP2Location DB13 Sample BIN File Download (32.84 MB) Download (371.65 kB)
IP2Location DB14 Sample BIN File Download (75.70 MB) Download (410.29 kB)
IP2Location DB15 Sample BIN File Download (37.06 MB) Download (378.07 kB)
IP2Location DB16 Sample BIN File Download (80.23 MB) Download (415.93 kB)
IP2Location DB17 Sample BIN File Download (39.59 MB) Download (380.09 kB)
IP2Location DB18 Sample BIN File Download (87.03 MB) Download (425.95 kB)
IP2Location DB19 Sample BIN File Download (71.22 MB) Download (404.88 kB)
IP2Location DB20 Sample BIN File Download (89.37 MB) Download (427.07 kB)
IP2Location DB21 Sample BIN File Download (40.38 MB) Download (380.72 kB)
IP2Location DB22 Sample BIN File Download (93.23 MB) Download (430.11 kB)
IP2Location DB23 Sample BIN File Download (71.61 MB) Download (405.90 kB)
IP2Location DB24 Sample BIN File Download (94.28 MB) Download (431.79 kB)