lmi2jw
Last Updated: February 25, 2016
·
498
· barnettjw
43ea08b4fc547e8a5da87c207bea2123

Get external IP in a script

Ever need to get the external IP address of the server a script is running on?

localhost [~] $ curl http://icanhazip.com
129.121.176.228

There's also the more professional looking (yet less fun) alternative URL of http://ifconfig.me/ip

Say Thanks
Respond
Filed Under