Annotation of /alx-src/branches/alx-web-070/include/common-functions.php
Parent Directory | Revision Log
Revision 8510 -
(hide annotations)
(download)
Mon Feb 8 09:16:29 2016 UTC (8 years, 7 months ago) by niro
File size: 326 byte(s)
Mon Feb 8 09:16:29 2016 UTC (8 years, 7 months ago) by niro
File size: 326 byte(s)
-code cleanup, removed obsolete cruft
1 | niro | 2021 | <? |
2 | niro | 2194 | include('config.inc.php'); |
3 | include('ppping.inc.php'); | ||
4 | niro | 2021 | |
5 | niro | 2194 | function online($ip) |
6 | { | ||
7 | $ping = new PPPing(); | ||
8 | $ping->hostname = $ip; | ||
9 | $ping->timeout = "0.3"; | ||
10 | $result = $ping->Ping(); | ||
11 | |||
12 | if($result<0) | ||
13 | { | ||
14 | echo "error: ".$ping->strError($result); | ||
15 | $retval=1; | ||
16 | niro | 2021 | } |
17 | niro | 2194 | else |
18 | { | ||
19 | echo $result." ms"; | ||
20 | $retval=0; | ||
21 | } | ||
22 | return $retval; | ||
23 | } | ||
24 | niro | 2021 | ?> |