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.20090201.tar.bz2 (42.5 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