Thanks itsyM
This looks a little complicated for me. What is it written in?
Someone on another forum posted this:-
Put a file up on your private server, for example foo.gif. Then, use simple code like this to check if the server is up or down:
code:--------------------------------------------------------------------------------<script type=“text/javascript”>
var url = “http://www.yourprivateserver.com/foo.gif”;
var img = new Image();
img.src = url;
img.onload = function()
{
// If the server is up, do this.
alert("Server is up!");
}
img.onerror = function()
{
// If the server is down, do that.
alert("Server is down!");
}
</script>--------------------------------------------------------------------------------
I replied with:-
Thanks for that code it looks great. However will it work with a password protected server - my private server (apache) is actualy running on my home PC, so for security it is always password protected, and that includes my root htdocs directory.
Do you think it would be to much of a security risk to have a small unprotected directory (presumably that would have to be the root - entry point) just to hold an image for the purposes of checking, and then to password protect the rest of the site?
What do you think, itsyM, would the security risk be too big?
Thanks in advance
Dan Hawkes