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. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Rad
    Replies:
    0
    Views:
    551
  2. Hugh  Mandeville
    Replies:
    3
    Views:
    2,230
    shakah
    Jul 21, 2005
  3. Matt
    Replies:
    2
    Views:
    120
    Mark Schupp
    Jan 21, 2004
  4. David Morel
    Replies:
    1
    Views:
    95
  5. Eckstein C.
    Replies:
    2
    Views:
    214
Loading...

Share This Page