Obtaining the public IP of a computer...
William de Smet
williamdesmet at gmail.com
Wed Feb 9 02:44:22 EST 2011
Hi Paul,
You can use this:
put URL "http://www.whatismyip.com/automation/n09230945.asp" into tMyPublicIP
put tMyPublicIP into fld "IP"
greetings,
William
2011/2/9 Paul Dupuis <paul at researchware.com>
>
> I am looking for ideas/suggestion on how, in live code, to obtain the public IP address of the computer a LiveCode standalone is running on.
>
> hostName() returns the name of the computer.
> hostNameToAddress(hostName()) return the IP address, such as 192.168.1.104, but (as in this case) if the system is behind a NAT device, like a typical internet router, all you get a is local address
> DNSservers() can get you the IPs of the computers DNS servers
>
> I can find no function to get the gateway address - i.e. the address of the router the computer is connected to.
>
> Is the only approach to go after the real IP is to do so through a shell command? Or is there some clever LiveCode function I am missing?
>
> --
>
> Paul Dupuis
> Cofounder
> Researchware, Inc.
> http://www.researchware.com/
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
More information about the use-livecode
mailing list