Re: How To Know If an Internet Connection is Active

Author: Ken McGinnis

Posted: 2006-06-30 at 00:35:12

I advise against using ping. I have my routers set so that ping is not returned. I send all ports to the local IP: 192.168.33.254

which does not exist. This is recommended by grc.com. The only open port is 80 (or whatever port you need) on a server.

I think the best idea is to download a web site page that you think will always be present like yahoo.com and examine it to make

sure it is a real site and not 404 or some other error.

----- Original Message -----

From: "Andy Davies" <a.davies@manchester.gov.uk>

To: <profox@leafe.com>

Sent: Thursday, June 29, 2006 1:04 AM

Subject: Re: How To Know If an Internet Connection is Active

Declare Integer InternetCheckConnection in Wininet.dll String Url, Long

Flags, Long Reserved

lnResult = InternetCheckConnection("http://leafe.com/",1,0)

?IIF(lnResult = 0,'NOT connected', 'Connected') && NOT connected

* Doesn't work through [our] firewall

* neither does:

!ping leafe.com

* wonder if it uses ping under the hood?

Andrew Davies MBCS CITP

- AndyD 8-)#

**********************************************************************

This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom

they are addressed. If you have received this email in error please notify the system manager.

This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses.

Please contact internet.administrators@manchester.gov.uk with any queries.

**********************************************************************

[excessive quoting removed by server]

©2006 Ken McGinnis