get IP Address in Lua
snippet in lua

get IP Address in Lua

user8966

require "socket"

local s = socket.udp()
s:setpeername("74.125.115.104",80)
local ip, _ = s:getsockname()
print(ip)