Magellan Linux

Contents of /alx-src/branches/alx-web-070/include/common-functions.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 8510 - (show annotations) (download)
Mon Feb 8 09:16:29 2016 UTC (8 years, 2 months ago) by niro
File size: 326 byte(s)
-code cleanup, removed obsolete cruft
1 <?
2 include('config.inc.php');
3 include('ppping.inc.php');
4
5 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 }
17 else
18 {
19 echo $result." ms";
20 $retval=0;
21 }
22 return $retval;
23 }
24 ?>