I'm writing a script that needs to list all the external IPs for the server. It needs to work with multiple NICs. What's the best method to get said IP addresses in PHP?

If it's any help, I found this question, however it is directed at Python and not PHP;
[Python, How to get all external ip addresses with multiple NICs](https://stackoverflow.com/questions/8281371/python-how-to-get-all-external-ip-addresses-with-multiple-nics)