Changeset 57 for trunk/www/common/global.php
- Timestamp:
- Aug 4, 2009, 5:32:06 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/www/common/global.php
r55 r57 70 70 ); 71 71 72 function ErrorHandler() 73 { 74 } 75 72 76 class System extends Module 73 77 { … … 171 175 return($Value.' '.$PrefixMultipliers[$PrefixType]['Definition'][$I][0].$Unit); 172 176 } 177 178 function NetworkPortState($Address, $Port, $Timeout = 1) 179 { 180 set_error_handler('ErrorHandler'); 181 if($Socket = @fsockopen($Address, $Port, $ERROR_NO, $ERROR_STR, (float)$Timeout)) 182 { 183 fclose($Socket); 184 $Result = true; 185 } else $Result = false; 186 restore_error_handler(); 187 return($Result); 188 } 173 189 } 174 190
Note:
See TracChangeset
for help on using the changeset viewer.