This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

HL Public IP script
#2
Try this:

Code:
require('socket.http')
socket.http.TIMEOUT = 5
local data = socket.http.request('http://api.ipify.org')

if not data then
return
log('No response getting IP')
end

ip_old = storage.get('ip_old')
if ip_old == nil then
storage.set('ip_old', data)
end

if data ~= ip_old then
storage.set('ip_old', data)
log('IP changed, new IP is: ' .. data)
end
Reply


Messages In This Thread
HL Public IP script - by Mrinj - 22.12.2017, 18:45
RE: HL Public IP script - by FatMax - 22.12.2017, 19:11
RE: HL Public IP script - by davidchispas - 01.03.2021, 15:40
RE: HL Public IP script - by Josema - 11.04.2024, 15:59
RE: HL Public IP script - by Mrinj - 22.12.2017, 19:29
RE: HL Public IP script - by FatMax - 22.12.2017, 22:35
RE: HL Public IP script - by Daniel - 01.03.2021, 15:51

Forum Jump: