If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Need help for code to check if website is down

Hi Guyz ,
I am wondering if some one can help me please . I have got a asp page which check if the specific website is UP/Down . but unfortunately this code is not working in properly . What is happening actually if i pass an invalid webaddress it tells me that this web site is not working but i pass a valid webaddress where web is down it tells me that web site is working .
My Code is :-

<% response.buffer = TRUE %>
<HTML>
<!-- #include file="i_axapta.asp" -->
<%
//
// Get the URL to be checked from the html form
checkURL=Request.QueryString("checkURL")
Dim error
error=false
CheckURL = "(URL address blocked: See forum rules)"
//
// create an XMLHTTP object that is the vehicle for the page check
//
Set GetConnection = CreateObject("Microsoft.XMLHTTP")
//
// open a path to the chosen URL and attempt to send data to it
//
GetConnection.Open "get", CheckURL, False
GetConnection.Send()
//
// check the return code, 200 mean OK, all the rest are warnings or errors
// If 200 is returned, this script redirects to the valid page, if not it returns an error statement
//
if GetConnection.status = 200 then

window.close();
}
</SCRIPT>
</HEAD>
<BODY onLoad="JavaScript: closeWindow();">
</BODY>
</HTML>
Now i don't know what i am doing wrong here
I will appreciate any quick help as this critical for my project