<?php $fp = fsockopen ("xxx.xxx.xxx.xxx", 80, $errno, $errstr, 30); if (!$fp) { echo "Down\n"; } else { echo "Up\n"; fclose ($fp); } ?>
While this works when the server is UP, I get the following error when it is down along with the 'Down' output:
Warning: fsockopen(): php_hostconnect: connect failed in /****/public_html/status/test.php on line 2
Warning: fsockopen(): unable to connect to xxx.xxx.xxx.xxx:80 in /****/public_html/status/test.php on line 2
Down
Can anyone help me out here?
Thanks, Jason Williard
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php