mirror of
https://github.com/lionsoul2014/ip2region.git
synced 2025-12-08 19:25:22 +00: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));
|