Here is a quick from allapi.com:
VB Code:
Private Const FLAG_ICC_FORCE_CONNECTION = &H1
Private Declare Function InternetCheckConnection Lib "wininet.dll" Alias "InternetCheckConnectionA" (ByVal lpszUrl As String, ByVal dwFlags As Long, ByVal dwReserved As Long) As Long
Private Sub Form_Load()
'KPD-Team 2001
'URL: [url]http://www.allapi.net/[/url]
If InternetCheckConnection("http://www.allapi.net/", FLAG_ICC_FORCE_CONNECTION, 0&) = 0 Then
MsgBox "Connection to [url]http://www.allapi.net/[/url] failed!", vbInformation
Else
MsgBox "Connection to [url]http://www.allapi.net/[/url] succeeded!", vbInformation
End If
End Sub