Dim strWebsite strWebsite = "www.robvanderwoude.com" If IsWebsiteUp( strWebsite ) Then WScript.Echo "Web site " & strWebsite & " is up and running!" Else WScript.Echo "Web site " & strWebsite & " is down!!!" End If Function IsWebsiteUp( myWebsite ) ' This function checks if a website is running by sending an HTTP request. ' If the website is up, the function returns True, otherwise it returns False. ' Argument: myWebsite [string] in "www.domain.tld" format, without the ' "http://" prefix. ' ' Written by Rob van der Woude ' http://www.robvanderwoude.com ' ' The X-HTTP component is available at: ' http://www.xstandard.com/page.asp?p=C8AACBA3-702F-4BF0-894A-B6679AA949E6 ' For more information on available functionality read: ' http://www.xstandard.com/printer-friendly.asp?id=32ADACB9-6093-452A-9464-9269867AB16E Dim objHTTP Set objHTTP = CreateObject( "XStandard.HTTP" ) objHTTP.AddRequestHeader "User-Agent", _ "Mozilla/4.0 (compatible; MyApp 1.0; Windows NT 5.1)" objHTTP.Get "http://" & myWebsite If objHTTP.ResponseCode = 200 Then IsWebsiteUp = True Else IsWebsiteUp = False End If Set objHTTP = Nothing End Function