It's like ping, but connect to server status port, not send ICMP.
First you must set in config.lua of your server:
and /reload config
Then on your home PC create in www directory file and paste:
Now change IP and port to your server IP and port and open website
It will show something like:
First you must set in config.lua of your server:
PHP:
statusTimeout = 0
Then on your home PC create in www directory file and paste:
PHP:
<?PHP
echo 'Start<br />';
$c = 1000;
$d = 0;
$scp = 0;
$start = microtime(true);
$log = '';
for($s = 0; $s < $c; $s++)
{
usleep(20000);
$ut = microtime(true);
$sock = @fsockopen("188.165.58.251", 7173, $errno, $errstr, 1);
if ($sock)
{
$at = microtime(true);
$ct = $at - $ut;
$scp += $ct;
if($ct > $max || !isset($max))
$max = $ct;
if($ct < $min || !isset($min))
$min = $ct;
fwrite($sock, chr(6).chr(0).chr(255).chr(255).'info');
$data='';
while (!feof($sock))
$data .= fgets($sock, 1024);
fclose($sock);
$log .= 'ONLINE | Connected in <b>' . (round($ct, 5) * 1000) . '</b> ms<br />';
$d++;
}
else
$log .= 'OFF<br />';
}
echo 'Sent: <b>' . $c . '</b> | Answered: <b>' . $d . '</b> | Average: <b>' . (round(($scp / $d), 5) * 1000) . '</b> ms | Minimum: <b>' . (round($min, 5) * 1000) . '</b> ms | Maximum: <b>' . (round($max, 5) * 1000) . '</b> ms';
echo '<br />Test took <b>' . round(microtime(true) - $start, 2) . '</b> seconds.<br /><br />' . $log;
?>
It will show something like: