Nejste přihlášeni
Stránky 1
Vkládám přímo skript. Tento TOTOŽNÝ skript bezproblémově funguje na dvou mých placených hostingzích bez problému.
<?php
$server = "93.190.51.71";
$port = "2106";function pingDomain($server){
$starttime = microtime(true);//Server 1 Port
$file = fsockopen ($domain, 2106, $errno, $errstr, 10);
$stoptime = microtime(true);
$status = 0;if (!$file) $status = -1;
else {
fclose($file);
$status = ($stoptime - $starttime) * 1000;
$status = floor($status);
}
return $status;
}$status = pingDomain($serverbase);
if ($status <= 50) $MessageStatus = "";
elseif ($status <= 80) $MessageStatus = "";
elseif ($status <= 150) $MessageStatus = "";
else $MessageStatus = "";$upmessage = "<font size='1' color='white'> </font><font color='gray'
size='1'>$MessageStatus</font>";
$downmessage = "<font size='1' color='white'> </font><font color='gray'size='1'></font>";
$tout = "5";
$server1 = @fsockopen ($server, $port, $errno, $errstr, $tout);
if(!$server1){ echo"<b><font color='black' size='2' style='Arial'>Lineage 2</font></b><br><font color='black' size='2' style='Arial'>Login </font><fontsize='1' color='white'></font><font color='red' size='2' style='Arial'><strong> Off-line</strong></font><br>$downmessage"; }
else { echo"<b><font color='black' size='2' style='Arial'>Lineage 2</font></b><br><font color='black' size='2' style='Arial'>Login </font><font size='1'color='white'></font><font color='green' size='2' style='Arial'><strong> On-line</strong></font><br>$upmessage"; }
$server2 = "93.190.51.71";
$port2 = "7777";function pingDomain2($server2){
$starttime2 = microtime(true);//Server 2 Port
$file2 = fsockopen ($domain2, 7777, $errno, $errstr, 10);
$stoptime2 = microtime(true);
$status2 = 0;if (!$file2) $status2 = -1;
else {
fclose($file2);
$status2 = ($stoptime2 - $starttime2) * 1000;
$status2 = floor($status2);
}
}$status2 = pingDomain($serverbase2);
if ($status2 <= 50) $MessageStatus2 = "";
elseif ($status2 <= 80) $MessageStatus2 = "";
elseif ($status2 <= 150) $MessageStatus2 = "";
else $MessageStatus2 = "";$upmessage2 = "<font size='1' color='white'> </font><font color='gray'
size='1'>$MessageStatus2</font>";
$downmessage2 = "<font size='1' color='white'></font><font color='gray'size='1'></font>";
$tout = "5";
$server2 = @fsockopen ($server2, $port2, $errno, $errstr, $tout);
if(!$server2){ echo"<font color='black' size='2'style='Arial'> Game 25x</font><font size='1' color='white'></font><font
color='red' size='2' style='Arial'><strong> Off-line</strong></font><br>$downmessage2"; }
else { echo"<font color='black' size='2' style='Arial'> Game 25x</font><fontsize='1' color='white'></font><font color='green' size='2' style='Arial'><strong> On-line</strong></font><br>$upmessage2"; }
?>
Proměná je $server = "IP serveru"; , tu mám doplněnou. Na předchozím hostingu (profitux.cz) byl skript funkční bez problémů.
Mohu zaslat skript pomocí PM.
Dobrý den,
můj php skript pro zjištování stavu (online/offline) serveru bohužel u Vás nefunguje. Prosím o radu, Děkuji.
http://games.free-servers.eu/la2/cz/status-lineage.php
Stránky 1