--- Begin Message ---This is probably what you are looking for (one of the code snippets does exactly what you want). http://forum.world.st/Figuring-out-external-IP-addresses-of-network-interfaces-td4937291.html As for services/websites you can query to get the public ip address, here's a short list (you'll have to modify the example above to parse the response correctly): http://checkip.dyndns.com https://www.whatismypublicip.com/ http://freegeoip.net https://who.is/ http://www.ipchicken.com/ http://www.whatsmyip.org/ https://api.ipify.org/ https://whatismyipaddress.com/IMHO, the simplest is api.ipify.org. However, note that some of those service also answer geolocation info! ----------------- Benoît St-Jean Yahoo! Messenger: bstjean Twitter: @BenLeChialeux Pinterest: benoitstjean Instagram: Chef_Benito IRC: lamneth Blogue: endormitoire.wordpress.com "A standpoint is an intellectual horizon of radius zero". (A. Einstein) On Wednesday, March 14, 2018, 6:08:41 AM EDT, Denis Kudriashov <dionisi...@gmail.com> wrote: Hello. Do we have a way to retrieve IP address from Pharo?I tried to use following code: NetNameResolver addressForName: NetNameResolver localHostName But it either not works (dialog with retry give-up options) or returns localhost 127.0.0.1. Best regards,Denis
--- End Message ---
Re: [Pharo-dev] Getting IP address of machine from Pharo
Benoit St-Jean via Pharo-dev Wed, 14 Mar 2018 03:22:22 -0700
- [Pharo-dev] Getting IP address of machine fr... Denis Kudriashov
- Re: [Pharo-dev] Getting IP address of ma... Julien
- Re: [Pharo-dev] Getting IP address o... Denis Kudriashov
- Re: [Pharo-dev] Getting IP addre... Julien
- Re: [Pharo-dev] Getting IP a... Denis Kudriashov
- Re: [Pharo-dev] Getting... Henrik Sperre Johansen
- Re: [Pharo-dev] Getting IP address of ma... Benoit St-Jean via Pharo-dev