Published at LXer:
There are two ways to retrieve external/public IP addresses for your Linux server or system. The fastest method is by resolving the DNS (dig, host), and the other is by retrieving server data through the HTTP protocol (cURL, wget).
Read More...