[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: ANN: IP-to-country lookup in Lua
- From: "Jeff Pohlmeyer" <yetanothergeek@...>
- Date: Tue, 22 Jan 2008 03:01:56 -0600
On Jan 21, 2008 2:34 PM, Duck <duck@roaming.ath.cx> wrote:
> This seemed a good sort of "small is beautiful" match for Lua, so I have
> written a Lua module, consisting of a single Lua file, to use this data
> for IP-to-country lookup.
>
> http://software77.net/geo/webnet77.lua.gz
>
> It's licensed under a "What You Will" licence.
Hey, this is really handy, thanks for posting!
I started tweaking the code a bit to better suit my needs,
and I did stumble upon one possible bug:
> local a,b,c,d = ip:match('(%d+).(%d+).(%d+).(%d+)')
I think that should that be:
local a,b,c,d = ip:match('(%d+)%.(%d+)%.(%d+)%.(%d+)')
Regards,
- Jeff