Question: How can i go about programaticaly getting the IP address of my network as seen from the Internet? Its obviously a property that my router has access to when it connects to the ISP. Is there any way to get this info from a router using a standard protocol. My only other option is to either find a WS which returns my IP address (suprisingly difficult to do), or just go to something like [whatismyip.com](http://www.whatismyip.com) and strip out all the HTML (very dirty and susceptable to change). Is there any other way???

Answer: 
If your router supports snmp you could use that to ask it about it's external ip. A small example is found here:

<http://www.rohitab.com/discuss/index.php?showtopic=31901>
I don't see a language specifacation but I did it here in python: [Finding a public facing IP address in Python?](https://stackoverflow.com/questions/166545/finding-a-public-facing-ip-address-in-python)  
Basicly there is no way of doing it without relying on an external server, in this case I use <http://www.whatismyip.com/automation/n09230945.asp> which only provide the ip address.
Alternatively you could use your own script which in PHP would look like:

```
<?php
echo $_SERVER['REMOTE_ADDR'];
?>

```