I've got a function that's SUPPOSED to check if an url exists.
Function URLExists(URL As String) As Boolean
Dim HttpWebRequest_ As HttpWebRequest = WebRequest.Create(URL)
HttpWebRequest_.Method="HEAD" 'It doesn't work even without this.
Dim HttpWebResponse_ As HttpWebResponse = HttpWebRequest_.GetResponse()
Return HttpWebResponse_.StatusCode = HttpStatusCode.OK
End Function
If I try URLExists("http://www.google.com/thisPageDoesNotExistAndIsRetarded.html"), it returns True, and if I try URLExists("https://www.google.com/"), (which obviously exists), it returns True, (correct). Thanks.