lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hello,

IPLocation provides a Lua front-end to MaxMind's GeoLite City data [1].

The data itself is packaged as a -rather hefty- SQLite3 database:

http://alt.textdrive.com/assets/public/Nanoki/IPLocation.100.zip (48.3 MB)

Usage example:

#!/usr/bin/env lua
local IPLocation = require( 'IPLocation' )
local aLocation = IPLocation[ '128.112.155.165' ]

print( aLocation.city, aLocation.region, aLocation.country  )

> Princeton	New Jersey	United States

IPLocation requires LuaSQL and SQLite3.

Cheers,

--
PA.
http://alt.textdrive.com/nanoki/

[1] http://www.maxmind.com/app/geolitecity