Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can I truly check for Internet connection?
Message
 
 
To
20/11/2002 10:29:41
General information
Forum:
Visual FoxPro
Category:
Internet applications
Miscellaneous
Thread ID:
00724735
Message ID:
00738861
Views:
21
Hi Steve,

You posted the following a few weeks ago - would it also check if the user is hooked to the web with a DialUp connection?

Mel Cummings


>For a user with a LAN connection to the internet, pinging is the most reliable method. If you are concerned that an internet server may be down, then check a different server if the first one returns false.

Here is a function you can use
function checkInternetConnection
lparameters lcWebAddress

	Declare Integer InternetCheckConnection in Wininet.dll String Url, Long dwFlags, Long Reserved

	If InternetCheckConnection(lcWebAddress, 1, 0) != 0
		return .t.
	Else
		return .f.
	EndIf
endproc
Example usage:


? checkInternetConnection("http://www.microsoft.com")<
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform