I am attempting to create a UPnP method on an internal PHP server if at all possible. I need it to be mostly platform independent so that it may run on Windows, OSX, or Linux.
I believe I can get my SOAP protocols working for UPnP, but first I must determine the IP address of the gateway/router that the server goes through. Is it possible to retrieve this information with PHP? If not, what about Python or Ruby?
I have done this in C# but am looking for a more platform independent method now.
Thanks!
CLARIFICATION: I am looking for the internal IP address of the gateway, not the external IP.