4 ms·
In a shell script you can do: MYIP="`curl -s http://ipinfo.io/ip`" http://myip.enix.org/REMOTE_ADDR http://myip.enix.org/REMOTE_ADDR is similar.
by antoncohen 13y ago
In a shell script you can do:
MYIP="`curl -s http://ipinfo.io/ip`"
http://myip.enix.org/REMOTE_ADDR http://myip.enix.org/REMOTE_ADDR is similar.
- ytjohn 13y agoMy "goto" for shell scripts is http://echoip.org/ http://echoip.org/, though I recently setup my own such script as well. It's a one-liner in PHP, though having some json output alternatives would be useful as well.