> >Declare Integer InternetCheckConnection In Wininet.Dll String Url, Long dwFlags, Long Reserved >lcURL = "http://www.yahoo.com" >If InternetCheckConnection(lcURL, 1, 0) = 0 > gcConnectionStatus = 'Not connected' > gcIPAddress = 'Not Connected' >Else > gcConnectionStatus = 'Yes, connected' > ox = Createobject('internetexplorer.application') > ox.navigate2("whatismyip.org") > N = 0 > Do While ox.busy > N = N + 1 > Enddo > If Type("ox") = "O" > odoc = ox.Document > gcIPAddress = odoc.Body.InnerText > Endif > > If Substr(gcIPAddress,1,15) = 'The page cannot' > ox = Createobject('internetexplorer.application') > ox.navigate2("http://www.whatismyipaddress.com") > N = 0 > Do While ox.busy > N = N + 1 > > Enddo > > > > If Type("ox") = "O" > odoc = ox.Document > WAIT WINDOW odoc.Body.InnerText > gcIPAddress = odoc.Body.InnerText > Endif > Endif >Endif > >>