Set Inet = Server.CreateObject("InetCtls.Inet.1")
Inet.URL = "http://www.yahoo.com/"
Inet.AccessType = icDirect
Inet.Protocol = icHTTP
Inet.RemotePort = 80
Inet.RequestTimeout = 60
response.write(Inet.ResponseCode)
I got this piece of code from some forum on the web. The responsecode
is supposed to return whether the connection is sucessful (ie. got a
response from the web server) or not. However, I am finding that the
responsecode always return 0, like if i use www.yahoo.com or
www.yahoo.csdfsdfsd.
What is the best way to check whether a website is up or not using
ASP?
thanks,
Pius