lua-users home
lua-l archive

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


On Fri, Mar 25, 2011 at 21:31, Petite Abeille <petite.abeille@gmail.com> wrote:
> On Mar 25, 2011, at 6:33 PM, Tony Finch wrote:

>>> Announcing lua-geoip 0.1.1, a set of bindings for MaxMind's GeoIP library.

>> Funnily enough I have been playing around with the MaxMind data this week.

> Me too! :))

> Just imported it in SQLite though. The original GeoLiteCity-Blocks.csv + GeoLiteCity-Location.csv is around 140 MB. The resulting SQLite database is ~152 MB.

> Usage example:

> local IPLocation = require( 'IPLocation' )
> local aLocation = IPLocation[ '131.111.8.51' ]

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

>> Cambridge     Cambridgeshire  United Kingdom

> http://dev.alt.textdrive.com/browser/HTTP/IPLocation.lua
> http://dev.alt.textdrive.com/browser/HTTP/IPLocation.dml

Any numbers regarding the number of queries per second in this setup?

Alexander.