Ver Mensaje Individual
  #2 (permalink)  
Antiguo 24/05/2011, 09:09
Avatar de Javier01
Javier01
 
Fecha de Ingreso: febrero-2008
Ubicación: Montevideo
Mensajes: 261
Antigüedad: 16 años, 2 meses
Puntos: 31
Respuesta: lector rss en asp error

Sacado de http://xstandard.com/en/documentation/xhttp/


This example shows how to check the status of a Web siteAn HTTP response code
number 200 means the Web server sends data back OK.

Código ASP:
Ver original
  1. Dim objHTTPSet
  2. objHTTP = Server.CreateObject("XStandard.HTTP")
  3. objHTTP.AddRequestHeader "User-Agent", "Mozilla/4.0 (compatible; MyApp 1.0; Windows NT 5.1)"
  4. objHTTP.Get "http://xstandard.com"
  5. If objHTTP.ResponseCode = 200 Then
  6.     Response.Write "Web site is up and running!"
  7. Else
  8.     Response.Write "Web site is down!!!"
  9. End If
  10. Set objHTTP = Nothing