get the IP (Internet Protocol)

Hello everyone
Xojo

How can I get the IP (Internet Protocol) of the computer from a desktop application xojo

Any comment is very appreciated

Raul Juarez Pulache

Ping http://ipv4.whatip.me/?json with a HTTPSocket.

If you have a web site, you can install your own page to do the same in minutes.

<?php print $remote_addr = $_SERVER[ 'REMOTE_ADDR' ] ; ?>

Do you mean the internal or external/public IP address?

You may find System.GetNetworkInterface useful. See http://documentation.xojo.com/index.php/System.GetNetworkInterface

If you do indeed want the web facing IP of the network, bear in mind that sometimes the IP that is provided to the remote server is the IP address of the proxy at your ISP/company so it’s not technically your externally facing IP. This is usually double checked by firing a web request at a non-web port or a port outside the usual proxy range.

I’ve not checked how prolific this has been in the last 10 years since I’ve not really done major web stuff since then so it might be a mute point so it’s just FYI.

To add another voice to the choir, Xojo recently did a blog article about this you can see here which shows an example of how to use Ipify