How to check server status using InetCtls.Inet?

Discussion in 'ASP General' started by Pius, Jul 2, 2003.

  1. Pius

    Pius Guest

    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
     
    Pius, Jul 2, 2003
    #1
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.