My computers are sitting behind a router/firewall. How do I programmatically find out what my external IP address is. I can use http://www.whatsmyip.org/ for ad-hoc queries,
Unfortunately there is no easy way to do it.
I would use a site like www.whatsmyip.org and parse the output.
checkip.dyndns.com returns a very simple HTML file which looks like this:
Current IP Check Current IP Address: 84.151.156.163
This should be very easy to parse. Moreover the site is exists for about ten years. There is hope that it will be around for a while.