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
#1
Hi,

Until now I've used this script for the public IP change on HL:
Code:
ip_old = grp.getvalue('10/1/253')

require("socket.http")
myip = (socket.http.request("http://whatismyip.org/"))
ip = myip:match("[%font%-weight%: 600;\"%>](%d+%.%d+%.%d+%.%d+)")

if ip ~= ip_old then
 subject = 'HL has New Public IP'
 message = ip
 Email('my@email.com', subject, message)
end

grp.checkwrite('10/1/253', ip,dt.string)

Unfortunately whatismyip.org is closed and the script is not working.

Then I created this one:
Code:
ip_old = grp.getvalue('10/1/253')

require("socket.http")
ip = (socket.http.request("https://api.ipify.org"))

if ip ~= ip_old then
 subject = 'HL has New Public IP'
 message = ip
 Email('my@email.com', subject, message)
end

grp.checkwrite('10/1/253', ip, dt.string)

The csript is working in SciTE (or similar) in this version:
Code:
require("socket.http")
ip = (socket.http.request("https://api.ipify.org"))
print (ip)
but NOT in HL.

What do I do wrong?!?
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: