Magellan Linux

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