Magellan Linux

Contents of /alx-src/tags/alx-web-0_7_0_20171218_1/include/common-functions.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 11135 - (show annotations) (download)
Mon Dec 18 12:03:27 2017 UTC (6 years, 4 months ago) by niro
File size: 326 byte(s)
tagged 'alx-web-0_7_0_20171218_1'
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 ?>