Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.
One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.
Public Declare Function WinHttpOpen Lib "WinHttp.dll" (ByVal pwszUserAgent As String, ByVal dwAccessType As Int32, ByVal pwszProxyName As String, ByVal pwszProxyBypass As String, ByVal dwFlags As Int32) As Int32 Public Declare Function WinHttpConnect Lib "WinHttp.dll" (ByVal Hsession As Int32, ByVal SiteAddress As String, ByVal Port_Number As Int32, ByVal dwvalue As Int32) As Int32 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim hsession As Int32 Dim hconnect As Int32 Dim Herror As Int32 'Dim Exception As String Dim URL As String URL = "www.google.co.uk" hsession = WinHttpOpen("Visual Basic", 0, "", "", 0) hconnect = WinHttpConnect(hsession, URL, 80, 0) Herror = Err.LastDllError If Herror = 12005 Then MsgBox("Bad Url") End If End Sub
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.