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
#8
(01.03.2021, 15:40)davidchispas Wrote:
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 ipPublic_old = storage.get('ipPublic_old') if ipPublic_old == nil then storage.set('ipPublic_old', data) end if data ~= ipPublic_old then storage.set('ipPublic_old', data) log('IP changed, new IP is: ' .. data) end if data ~= ipPublic_old then    subject = 'IP Pública'   message = 'La nueva ip pública es: ' .. data   mail('xxxxxxxxxxxx', subject, message)   storage.set('ipPublic_old', data) end




Hi, I'm using this script and lately it was working fine but now I get notifications every little time (1-2 hours) and the IP has not changed. I receive an email notifying that the IP has changed but it appears blank, and after 60 seconds a second notification arrives with the same IP that I had previously.

Did you solve the problem?
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: