I put together this simple script but seem to be having problems with it. All the script does is ping an IP addy and then replies back if it is up or down. The problem is with the fsockopen command. It seems if the IP is up it works fine, only when the IP is offline does it hang at that point in the script. It will hang forever at this point or until the default timeout (30 sec.) in the php.ini file. Does anyone no of a fix or a work around for this? Thanks for the help!
#!c:\php <? $description_x = "11.64.68.162"; $port_x = "7"; $ptime_x = "10"; $status1 = "UP"; $status2="$description_x unreachable"; $file = fsockopen($description_x,$port_x,$errno,$errstr,$ptime_x); if (!$file) //Used for debugging echo "$status1"; else echo "$status2"; //end debugging -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]