I'm working with an API that requires the machine's external IP. As far as I know, the PHP environment I'm using can only get our internal IP.
The option on the table is using an external service such as whatismyip.com to tell us:
wget -q -O - http://whatismyip.com/automation/n09230945.asp
My concern is what happens if that fails. Is there a bulletproof way of determining a machine's IP without relying on external services?