Diff of /alx-src/tags/alx-web-0_7_0_20171218_1/include/basesql.php
Parent Directory
|
Revision Log
|
Patch
revision 7092 by niro, Wed Sep 9 07:56:01 2015 UTC | revision 7110 by niro, Wed Sep 9 11:20:52 2015 UTC | |
---|---|---|
# | Line 94 function sqlcount($what) | Line 94 function sqlcount($what) |
94 | return $res['c']; | return $res['c']; |
95 | } | } |
96 | ||
97 | function ping_host($host, $port, $timeout) | |
98 | { | |
99 | $retval = 244; | |
100 | ||
101 | $fp = @fsockopen($host, $port, $errCode, $errStr, $timeout); | |
102 | //echo "Ping $host:$port ==> "; | |
103 | if ($fp) { | |
104 | //echo 'SUCCESS'; | |
105 | fclose($fp); | |
106 | $retval = 0; | |
107 | } else { | |
108 | //echo "ERROR: $errCode - $errStr"; | |
109 | $retval = 1; | |
110 | } | |
111 | //echo PHP_EOL; | |
112 | ||
113 | return $retval; | |
114 | } | |
115 | ||
116 | ?> | ?> |
|