mirror of
https://github.com/netfun2000/ip2region.git
synced 2026-02-27 09:44:31 +08:00
8 lines
250 B
Lua
8 lines
250 B
Lua
-- ip2region test lua script
|
|
local cjson = require "cjson";
|
|
local Ip2region = require "Ip2region";
|
|
|
|
local searcher = Ip2region:new({dbFile = "../../data/ip2region.db"});
|
|
local data = searcher:memorySearch("120.79.17.142");
|
|
print(cjson.encode(data));
|