There are website that show you the IP address that you appear to be coming from. Like... My IP
This is ugly but if you don't want to rely on the accuracy of someone else's website you could try something along these line to pull the data from the router.
I was able to pull this from my linksys router and I see the WAN IP.
Code:
$IE = CreateObject("internetexplorer.application")
$IE.Visible = 1
$IE.Navigate("http://192.168.1.1")
$IE = 0
SendKeys("{TAB}{TAB}passwordhere{ENTER}")
SendKeys("~FA")
SendKeys("c:\ip.htm")
SendKeys("{TAB}{TAB}{ENTER}")
SendKeys("~FC")
I tried to use the ReadHTML() function but I was unable to pass the authentication info.
You could then parse out the WAN IP from the IP.HTM file.
I know this is a nasty way of doing this but in the end you are going to have to read the IP in from an external source like a webpage, DNS, or something. The only other option I can think of is to interface directly with the memory on the router and issue commands directly against the firmware to pull the info. Best I could come up with after just crawling out of bed. Maybe something better will come to me after my brain wakes up.
Edited by Cybex (2004-10-20 01:17 PM)
_________________________
Common sense isn't so common.