You could always use a socket library (any you want) and use HTTP to GET this file from the internet:

http://www.ostrosoft.com/OIT/GetExternalIP.asp

Take a look at the source of the file returned. It just contains your external IP of your computer. This is what I use to get my external IP in programs. If the link changes you can always place the link string in a file/registry entry/resource file.

Making a little server program that does this so you can host it on your own server is real easy. So you might want to do that instead if you don't want to use that link (which I see no reason why not).

Hope I helped .