PHP Code:
<?
//////////////////////////////////////
// Statistik Script by I-Web Design //
// -------------------------------- //
// Contact: webmaster@michieru.de //
// Homepage: www.michieru.de //
// //
// Using: //
// You can use the Script for free //
// and edit it in all places. Only //
// keep this head-copyright on each //
// site of this script. //
// See info.txt for more details!!! //
//////////////////////////////////////
$config['server_ip']="you ip";//IP adress from the Server. $_SERVER["HTTP_HOST"] = IP from HTTP-server
//example:
//HTTP-Server IP = $config['server_ip']=$_SERVER["HTTP_HOST"];
//External IP = $config['server_ip']="127.0.0.1";
error_reporting(0);
$IP = array(
"login_server" => $config['server_ip'].":2106",
"game_server" => $config['server_ip'].":7777",
);
while(list($ServerName,$Host)=each($IP))
{
list($IPAddress,$Port)=explode(":",$Host);
if($fp=fsockopen($IPAddress,$Port,$ERROR_NO,$ERROR_STR,(float)0.5))
{
$config[$ServerName]="<font color=\"#00ff00\">Online</font>";
fclose($fp);
}else{
$config[$ServerName]="<font color=\"#ff0000\">Offline</font>";
}
}
mysql_close($verbindung);
echo " Login:".$config['login_server']." Server:".$config['game_server']."";
?>
im use this