HEELPBOOK - Getting external IP (Visual Basic) "How do I get my external ip?" I get this question fairly often from family and coworkers. Easy answer, your router. But it's not always handy to log in to your router just to get your actual IP address. An easier way would be to write a simple command line script. But unless your router has some API functionality for returning an external IP your best bet for getting it is going to be to ping a bounce-back server like WhatIsMyIP Here is a vbs script to do this automatically (myip.vbs): With CreateObject("MSXML2.XMLHTTP") .open "GET", "http://automation.whatismyip.com/n09230945.asp", False .send WScript.Echo .responseText End With WhatIsMyIP has rules about using their automation service, namely don't ping them more than once every 3 minutes. Well you can do what you want but they do seem to block successive attempts if you hammer their server. But in order to use this little script you'd need to call cscript.exe from the command line like this: cscript.exe myip.vbs That is unless you wrote a .bat/.cmd file (whatismyip.bat) to make the call: ::Display single line ip address using WhatIsMyIP.com's public access point @cscript //nologo myip.vbs //nologo: suppresses cscripts logo. @ before cscript: suppresses Windows batch command echo. ############ ARTICLE INFO ############# Article Month: December Article Date: 31/12/2012 Permalink: http://heelpbook.altervista.org/2012/getting-external-ip-visual-basic/ Source: http://www.seethroughskin.com/blog/?p=1218 Language: English View more articles on: http://www.heelpbook.net/ Follow us on Facebook: http://it-it.facebook.com/pages/HeelpBook/100790870008832 Follow us on Twitter: https://twitter.com/#!/HeelpBook Follow us on RSS Feed: http://feeds.feedburner.com/Heelpbook Follow us on Delicious: http://delicious.com/heelpbook Linkedin: http://it.linkedin.com/pub/stefano-maggi/27/73a/b20 Google+ : https://plus.google.com/116990277568167008289/posts