Checking the Internet connection

Andre Rombauts andre at rombauts.be
Fri Jan 15 03:20:39 EST 2010


Hello everyone!

I have made a deep search on RevTalk solutions for checking the  
Internet availability before executing an application requiring it.

There is often a rather long delay for returning the result when the  
computer is not connected, unless the test is made ith IP addresses  
instead of domain names. Thus, I tried a way using IP from well-known  
websites such as Google, Yahoo, Apple, CNN, UN. The result is sent in  
4-6 seconds. The best method, as I could test, is to use get url.

But I'm wondering if these IP are constant in time... The solution, to  
me, is to use a series of 5 sites. If 1 is OK, then link exists...

What do you think about this solution?

get url "http://157.166.226.27"
if it is empty then
       put false into varConnected
    else
       put true into varConnected
end if

André Rombauts,
Fléron (Liege), Belgium
Using Revolution Enterprise 4.5 build 1000
on OS X 10.6





More information about the use-livecode mailing list