Any idea's?
Thanks,
Jason
Code: Select all
on GetPublicIP
//clear date and time on form
put empty into field "lastupdate"
//url https://api.ipify.org/?format=json
send "GetPublicIP" to me in 600 seconds
get URL "https://api.ipify.org/?format=json"
put it into tPublicJson
put JSONToArray(tPublicJson) into tPublicIP
put tPublicIP["ip"] into tIP
set the cp_ipaddr of me to tIP
call PostToSite
end GetPublicIP
on PostToSite
put the cp_ipaddr of me into tIP
put "ipaddress=" & URLEncode(tIP) into tPostdata
post tPostdata to URL "http://myserver.com/myfile.lc"
//update form
put the short date && the long time into field "lastupdate"
end PostToSite