Example #1
0
         $textPingCurent = " = " . $pingTimeFinal . "ms ";
     } else {
         if ($server_checkPing != "") {
             $textPingCurent = " = NOT SAVED";
         }
     }
 } else {
     if ($server_checkPing != "") {
         $rezultatPing = $ping_text_try_check . ": " . $LastPingError;
     } else {
         $rezultatPing = $ping_text_try_check;
     }
 }
 $bestPingSaved = SavedPing($sh_host);
 $textPingAverage = pingResultColor($bestPingSaved[0], 1);
 $textPingBest = pingResultColor($bestPingSaved[2], 1);
 $diffPing = $bestPingSaved[0] - $bestPingSaved[2];
 $diffMargin = (int) ($bestPingSaved[2] * 50 / 100);
 if ($diffMargin < 50) {
     $diffMargin = 50;
 }
 if ($diffPing > $diffMargin) {
     $textPingAverage = "<FONT COLOR=red><B>! </B></FONT>" . $textPingAverage;
 }
 format1("Best ever responce time (ping) ", $textPingBest);
 format1("Average responce time (ping) ", $textPingAverage);
 format1("Current responce time (ping) ", $rezultatPing . $textPingCurent);
 /* 
    $webinterface = pingDomain($host_IP,"16001",1);
    
    if ($webinterface!=-1)
Example #2
0
                usleep(100000);
                $pingTry3 = pingDomain($host_IP, $host_PORT, 1);
                if ($pingTry3 > 0) {
                    $textPing = $textPing . ", " . $pingTry3 . "ms ";
                    $pingMax = max($pingTry1, $pingTry2, $pingTry3);
                    $pingTry = (int) (($pingTry1 + $pingTry2 + $pingTry3 - $pingMax) / 2);
                    SavePing($sh_host, $pingTry);
                    $LastPingError = "";
                }
            }
        }
    }
    echo "<table border=0 cellpadding=1 cellspacing=1>";
    echo "<tr>";
    echo "<td width=250 class=\"Node_ID\"><A HREF=" . $pagina . "?nodeDns={$sh_host}>" . $sh_host . "</A></td>";
    if ($LastPingError == "") {
        echo "<td width=150 class=\"tabel_normal\">" . $textPing . "</td>";
    } else {
        echo "<td width=150 class=\"tabel_normal\"><FONT COLOR=red>" . $LastPingError . "</FONT></td>";
    }
    if ($pingTry == "") {
        echo "<td width=60 class=\"Node_IDr\"></td>";
    } else {
        echo "<td width=60 class=\"Node_IDr\">" . $pingTry . "<FONT COLOR=gray> ms</FONT></td>";
    }
    echo "<td width=100 class=\"tabel_normal\">" . pingResultColor($pingTry) . "</td>";
    echo "<td width=50 class=\"tabel_hop_total2\"><B>" . pingColor(SavedPing($sh_host)) . "</B></td>";
    echo "</tr>";
    echo "</table>";
}
ENDPage();