22.12.2017, 18:45
Hi,
Until now I've used this script for the public IP change on HL:
Unfortunately whatismyip.org is closed and the script is not working.
Then I created this one:
The csript is working in SciTE (or similar) in this version:
but NOT in HL.
What do I do wrong?!?
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)
What do I do wrong?!?