Hi There,
I was wondering if someone had a couple of minutes to spare.
I use the following code to check if http is running on one of our internal windows nt 200 servers ;
if ($fp = @fsockopen("servername", 80, $errno, $err,2)) {
echo "HTTP is Up" ;
} else {
echo "HTTP is Down" ;
}
which works great, however how can I find out if the server is actually up.
I would like to be able to ping the server and if it's up get a 1 back and 0 for it the server is down.
I know i should be using exec but not sure how to bring back whether the server is up or not.
Cheers.
Mark