Checking for internet connection

Shari shari at gypsyware.com
Tue Feb 15 19:12:56 EST 2005


Did anyone ever reply to this?  My internet went down and I've been 
offline for the better part of a week except for logging in on 
someone else's computer to fill orders.  So I will send again now 
that I'm up and running again...

I've been using the following to check for internet connection:

if hostNameToAddress(www.gypsyware.com) is empty then
# not connected to the internet

I've just discovered a flaw in it.  I'm not connected to the internet 
and it is not coming up empty.  What's more, it is taking me to the 
web page!  Apparently if the page is cached, this will produce a 
false positive, and pull up the cached page.  That's bad.  Not 
desireable.  As one of the menu items is supposed to go to my website 
and check for newer versions of the software.

I didn't want a high falutin' piece of code.  I just wanted to know 
if someone was connected before attempting to take them somewhere. 
This was so simple, cross platform, short and sweet.  But dang those 
cached pages!

Any idears?

Shari
-- 
Mac and Windows shareware games
http://www.gypsyware.com


More information about the metacard mailing list