How to check server status using InetCtls.Inet?

P

Pius

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top