[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [ANN] lua-geoip 0.1.1
- From: Petite Abeille <petite.abeille@...>
- Date: Fri, 25 Mar 2011 19:31:16 +0100
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.
local IPLocation = require( 'IPLocation' )
local aLocation = IPLocation[ '188.8.131.52' ]
print( aLocation.city, aLocation.region, aLocation.country )
> Cambridge Cambridgeshire United Kingdom