<! Server Status ON/OFF />
<! Players Online />
<! Account and Characters Created />
<?php $server_ip = "localhost"; $loginserver_port = "7777"; $gameserver_port = "2106";
$login_status = @fsockopen( "$server_ip" , "$loginserver_port", $errno, $errstr, 0); $game_status = @fsockopen( "$server_ip" , "$gameserver_port", $errno, $errstr, 0);
if($login_status){ echo"Login: Online
"; } else{ echo"Login:: Offline
";
} if($game_status){ echo" Game: Online
"; } else{ echo" Game: Offline
"; }; mysql_close($connect); ?>
$login_status = @fsockopen( "$server_ip" , "$loginserver_port", $errno, $errstr, 0); $game_status = @fsockopen( "$server_ip" , "$gameserver_port", $errno, $errstr, 0);
if($login_status){ echo"Login: Online
"; } else{ echo"Login:: Offline
";
} if($game_status){ echo" Game: Online
"; } else{ echo" Game: Offline
"; }; mysql_close($connect); ?>
<! Players Online />
<?php $server_ip = "localhost"; $mysql_user = ""; $mysql_pass = ""; $database = "";
$connect = mysql_connect("$server_ip", "$mysql_user", "$mysql_pass") or die(mysql_error()); $db_select = mysql_select_db("$database", $connect) or die(mysql_error()); $query = mysql_query("SELECT online FROM characters WHERE online=1") or die(mysql_error()) ;
$online_chars = mysql_num_rows($query);
echo 'Players Online:'.$online_chars;
mysql_close($connect); ?>
$connect = mysql_connect("$server_ip", "$mysql_user", "$mysql_pass") or die(mysql_error()); $db_select = mysql_select_db("$database", $connect) or die(mysql_error()); $query = mysql_query("SELECT online FROM characters WHERE online=1") or die(mysql_error()) ;
$online_chars = mysql_num_rows($query);
echo 'Players Online:'.$online_chars;
mysql_close($connect); ?>
<! Account and Characters Created />
<?php $server_ip = "localhost"; $mysql_user = "root"; $mysql_pass = ""; $database = "test";
$connect = mysql_connect("$server_ip", "$mysql_user", "$mysql_pass") or die(mysql_error()); $db_select = mysql_select_db("$database", $connect) or die(mysql_error()); $characters = mysql_query("SELECT * FROM characters") or die(mysql_error()) ; $accounts = mysql_query("SELECT * FROM accounts") or die(mysql_error()) ;
$total_char = mysql_num_rows($characters); $total_acc = mysql_num_rows($accounts);
echo 'Characters created: '.$total_char.''; echo 'Accounts created: '.$total_acc;
mysql_close($connect); ?>
$connect = mysql_connect("$server_ip", "$mysql_user", "$mysql_pass") or die(mysql_error()); $db_select = mysql_select_db("$database", $connect) or die(mysql_error()); $characters = mysql_query("SELECT * FROM characters") or die(mysql_error()) ; $accounts = mysql_query("SELECT * FROM accounts") or die(mysql_error()) ;
$total_char = mysql_num_rows($characters); $total_acc = mysql_num_rows($accounts);
echo 'Characters created: '.$total_char.''; echo 'Accounts created: '.$total_acc;
mysql_close($connect); ?>