[code]<html>
<head>
<title>Call of Duty Server Stats</title>
<script language="javascript">
<!--
window.defaultStatus = "Call of Duty Server Stats";
-->
</script>
<style type="text/css">
<!--
body {  font-family: verdana, helvetica, arial, sans-serif; font-size: 10px; background-color: #999999; margin-top: 2px; margin-left: 0px; margin-bottom:2px; margin-right: 0px; scrollbar-face-color: #999999; scrollbar-highlight-color: #000000; scrollbar-shadow-color: #000000; scrollbar-3dlight-color: #999999; scrollbar-arrow-color: #000000; scrollbar-track-color: #999999; scrollbar-darkshadow-color: #999999 }
td {  font-size: 10px }
table {  border: 1px solid #000000 }
.tdgo {  font-family: verdana, arial, helvetica, sans-serif; font-weight: bold; background-color: #000000; border: 1px solid #FF0000; font-size: 9px; color: #FFFFFF }
-->
<!--
.tablenob {  border: 0px }
.tdbig {  font-size: 24px; font-weight: bold }
.tdbold {  font-weight: bold }
.tdplayer {  color: #FFFFFF }
.tdsmall {  font-family: arial, helvetica, sans-serif, verdana; font-weight: normal; font-size: 10px }
.tdlinksmall a:visited {  color: #000000; font-weight: normal; text-decoration: none }
.tdlinksmall a:hover {  text-decoration: underline }
.tdlinksmall a:link {  color: #000000; font-weight: normal; text-decoration: none }
.tdlink a:visited {  color: #000000; font-weight: bold; text-decoration: none }
.tdlink a:hover {  text-decoration: underline }
.tdlink a:link {  color: #000000; font-weight: bold; text-decoration: none }

.tdblue {  color: #0000FF }
.tdblack {  color: #000000 }
.tdgray {  color: #CCCCCC  }
.tdgreen {  color: #097B03 }
.tddarkblue {  color: #BDD7E6 }
.tddarkred {  color: #8B0000 }
.tdpink {  color: #CC00FF}
.tdred {  color: #FF0000 }
.tdwhite {  color: #FFFFFF }
.tdyellow {  color: #FFFF00 }
-->
</style>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<?
$standmo = "Call of Duty Server Stats | ";
?>
<?

########################################
##                                    ##
##     Call of Duty Server Stats      ##
##    Made by =(.T.T.B.)= Spikey      ##
## www.ttb.members.creativehosting.nl ##
##           Version 1.0              ##
##                                    ##
########################################

########################################
##                                    ##
##     Call of Duty Server Stats      ##
##     Made by Mark van Seventer      ##
##                                    ##
##           Version 1.1              ##
##                                    ##
##   CHANGES IN COMPARISON WITH 1.0   ##
##   Better lay-out using CSS-styles  ##
##   Better SourceCode; more orderly  ##
##   Improved and more map pictures   ##
##   More extensive error-messages;   ##
##     More Server Details showed     ##
## Sortable Nickname, Score and Ping  ##
##    Click To Join Server button     ##
##      Some small other changes      ##
########################################

########################################
##                                    ##
##     Call of Duty Server Stats      ##
##     Made by Mark van Seventer      ##
##                                    ##
##           Version 1.2              ##
##                                    ##
##   CHANGES IN COMPARISON WITH 1.1   ##
##           Change IP Form           ##
########################################

$adres = $_SERVER['QUERY_STRING'];
$adres = explode(":", $_SERVER['QUERY_STRING']);
$st_ip = $adres[0];
$st_port = $adres[1]; 

if($_SERVER['REQUEST_METHOD']=='POST'){   
    $verstuurd=1;   
$st_ip = $_POST['ip'];
$st_port = $_POST['port'];
}

if($st_ip == "" and $st_port == "")
{
echo '<table width="400" cellpadding="0" cellspacing="2" align="center">
<tr>
<td colspan="2" align="center" class="tdbig">Server Stats</td>
</tr>
</table>
<table width="400" cellpadding="0" cellspacing="0" align="center" class="tablenob">
<tr>
<td height="2"></td>
</tr>
</table>
<table width="400" cellpadding="0" cellspacing="0" align="center">
<tr>
<td colspan="3" align="center" class="tdbold">Enter IP</td>
</tr>
<script language="javascript">
function ClearIP() {
if (document.Go.ip.value == "'.$st_ip.'")
{
document.Go.ip.value = "";
}
}
function ClearPort() {
if (document.Go.port.value == "'.$st_port.'")
{
document.Go.port.value = "";
}
}
</script>
<form name="Go" method="post" action="'.$_SERVER['PHP_SELF'].'"> 
<tr>
<td width="200" align="right"><input class="tdgo" type="text" name="ip" ';
$verstuurd=0;   
if($verstuurd==1&&!empty($_POST['ip']))
{
echo "value=\"".stripslashes(htmlentities($st_ip))."\"";
}
else
{
echo 'value="'.$st_ip.'"';
}
echo ' size="15" onmouseover="window.status=\''.$standmo.'Change IP | Enter IP\'; return true" onmouseout="window.status=\'\'; true" onclick="ClearIP()" onFocus="ClearIP()"></td>
<td width="100" class="tdbold">:<input class="tdgo" type="text" name="port" ';
if($verstuurd==1&&!empty($_POST['port']))
{
echo "value=\"".stripslashes(htmlentities($st_port))."\"";
}
else
{
echo 'value="'.$st_port.'"';
}
echo ' size="5" maxlength="5" onmouseover="window.status=\''.$standmo.'Change IP | Enter Port\'; return true" onmouseout="window.status=\'\'; true" onclick="ClearPort()" onFocus="ClearPort()"></td>
<td width="100"><input class="tdgo" name="submit" type="submit" value="   Go   " onmouseover="window.status=\''.$standmo.'Change IP | Go\'; return true" onmouseout="window.status=\'\'; true"></td>
</tr>
</form>
</table>
</body>
</html>';
exit;
}

########################################
##   Hieronder alleen wijzigen als    ##
##  je weet wat je aan het doen bent  ##
########################################

if ($st_port == "")
{
$st_port = "28960";
}

function color($text)
 {
 $text = eregi_replace('\^0', '<span class="tdblack">',$text);
 $text = eregi_replace('\^1', '<span class="tdred">',$text);
 $text = eregi_replace('\^2', '<span class="tdgreen">',$text);
 $text = eregi_replace('\^3', '<span class="tdyellow">',$text);
 $text = eregi_replace('\^4', '<span class="tdblue">',$text);
 $text = eregi_replace('\^5', '<span class="tddarkblue">',$text);
 $text = eregi_replace('\^6', '<span class="tdpink">',$text);
 $text = eregi_replace('\^7', '<span class="tdwhite">',$text);
 $text = eregi_replace('\^8', '<span class="tddarkred">',$text);
 $text = eregi_replace('\^9', '<span class="tdgray">',$text);

 return $text;
 }
function tel($text)
 {
 $texta = explode("^", $text);
 $aantal = count($texta);
 return $aantal-1;
 }

if(!$_GET["ip"])
{
$s_port = $st_port; 
$s_ip   = $st_ip;
}
elseif(!$_GET["port"])
{
$ex = explode(":",$_GET["ip"]);
 if($ex[1] == ""){$ex[1] = 28960;}
$s_port = $ex[1];
$s_ip   = $ex[0];
}
else
{
$s_port = $_GET["port"];
$s_ip   = $_GET["ip"];
}

error_reporting(E_NOTICE); 

$s_con = fsockopen("udp://".$s_ip, $s_port);

fwrite($s_con, "ÿÿÿÿ". chr (0x02). "getstatus". chr (0x00));

fread($s_con, 4);

$status = socket_get_status($s_con);


// Geen verbinding
if($status["unread_bytes"] == 0)
{ 
echo '<table width="400" cellpadding="0" cellspacing="2" align="center">
<tr>
<td colspan="2" align="center" class="tdbig">Server Stats</td>
</tr>
</table>
<table width="400" cellpadding="0" cellspacing="0" align="center" class="tablenob">
<tr>
<td height="2"></td>
</tr>
</table>
<table width="400" cellpadding="0" cellspacing="0" align="center">
<tr>
<td align="center" class="tdbold">Sorry, can\'t connect to <span class="tdsmall">'.$st_ip.':'.$st_port.'</span>...</td>
</tr>
<tr>
<td height="5"></td>
</tr>
<tr>
<td align="center">Maybe the server is down, maybe you\'ve entered a wrong IP or you\'re not connected to the internet right now.<br>If all of this options are false, then there is an error while running this script.</td>
</tr>
</table>
<table width="400" cellpadding="0" cellspacing="0" align="center" class="tablenob">
<tr>
<td height="2"></td>
</tr>
</table>
<table width="400" cellpadding="0" cellspacing="0" align="center">
<tr>
<td colspan="3" align="center" class="tdbold">Change IP</td>
</tr>
<script language="javascript">
function ClearIP() {
if (document.Go.ip.value == "'.$st_ip.'")
{
document.Go.ip.value = "";
}
}
function ClearPort() {
if (document.Go.port.value == "'.$st_port.'")
{
document.Go.port.value = "";
}
}
</script>
<form name="Go" method="post" action="'.$_SERVER['PHP_SELF'].'"> 
<tr>
<td width="200" align="right"><input class="tdgo" type="text" name="ip" ';
$verstuurd=0;   
if($verstuurd==1&&!empty($_POST['ip']))
{
echo "value=\"".stripslashes(htmlentities($st_ip))."\"";
}
else
{
echo 'value="'.$st_ip.'"';
}
echo ' size="15" onmouseover="window.status=\''.$standmo.'Change IP | Enter IP\'; return true" onmouseout="window.status=\'\'; true" onclick="ClearIP()" onFocus="ClearIP()"></td>
<td width="100" class="tdbold">:<input class="tdgo" type="text" name="port" ';
if($verstuurd==1&&!empty($_POST['port']))
{
echo "value=\"".stripslashes(htmlentities($st_port))."\"";
}
else
{
echo 'value="'.$st_port.'"';
}
echo ' size="5" maxlength="5" onmouseover="window.status=\''.$standmo.'Change IP | Enter Port\'; return true" onmouseout="window.status=\'\'; true" onclick="ClearPort()" onFocus="ClearPort()"></td>
<td width="100"><input class="tdgo" name="submit" type="submit" value="   Go   " onmouseover="window.status=\''.$standmo.'Change IP | Go\'; return true" onmouseout="window.status=\'\'; true"></td>
</tr>
</form>
</table>
<table width="400" cellpadding="0" cellspacing="0" align="center" class="tablenob">
<tr>
<td height="2"></td>
</tr>
</table>
<table width="400" cellpadding="0" cellspacing="2" align="center">
<tr>
<td align="center" class="tdlink"><a href="stats.php" onmouseover="window.status=\''.$standmo.'Try Again\'; return true" onmouseout="window.status=\'\'; true">Try Again</a></td>
</tr>
</table>
</body>
</html>';
} 

else {

$empfangen = ""; 

do 
{ 
$empfangen .= fread($s_con, 1); 
$status = socket_get_status($s_con);
} 
while($status["unread_bytes"] != 0);

fclose($s_con);

$daten = explode("\n", $empfangen);
$rules = explode("\\",$daten[1]);

$find_pos = array_search ("gamename", $rules);
$gamename = $rules[$find_pos+1];

$find_pos = array_search ("sv_hostname", $rules);
$hostname = $rules[$find_pos+1];

$aantal = tel($hostname);
$hostname = color($hostname);

$find_pos = array_search ("mapname", $rules);
$mapname = $rules[$find_pos+1];
$mapname = strtolower($mapname);

$playercount = count ($daten);
$playercount = $playercount-3;

$find_pos = array_search ("sv_maxclients", $rules);
$maxplayers = $rules[$find_pos+1];

$find_pos = array_search ("g_gametype", $rules);
$gametype = $rules[$find_pos+1];
$gametypeconnect = $gametype;

$find_pos = array_search ("scr_killcam", $rules);
$killcam = $rules[$find_pos+1];
if($killcam == 1){$killcam = "On";}
else{$killcam = "Off";}

$find_pos = array_search ("scr_friendlyfire", $rules);
$friendlyfire = $rules[$find_pos+1];
if($friendlyfire == 2){$friendlyfire = "On";}
else{$friendlyfire = "Off";}

$find_pos = array_search ("shortversion", $rules);
$version = $rules[$find_pos+1];

$find_pos = array_search ("pswrd", $rules);
$password = $rules[$find_pos+1];
if($password == 1){$password = "Yes";}
else{$password = "No";}

$find_pos = array_search ("sv_punkbuster", $rules);
$punkbuster = $rules[$find_pos+1];
if($punkbuster == 1){$punkbuster = "On";}
else{$punkbuster = "Off";}


echo '<table width="400" cellpadding="0" cellspacing="2" align="center">
<tr>
<td colspan="2" align="center" class="tdbig">'.$gamename.' Server Stats</td>
</tr>
</table>
<table width="400" cellpadding="0" cellspacing="0" align="center" class="tablenob">
<tr>
<td height="2"></td>
</tr>
</table>
<table width="400" cellpadding="0" cellspacing="0" align="center">
<tr>
<td colspan="3" align="center" class="tdbold">Change IP</td>
</tr>
<script language="javascript">
function ClearIP() {
if (document.Go.ip.value == "'.$st_ip.'")
{
document.Go.ip.value = "";
}
}
function ClearPort() {
if (document.Go.port.value == "'.$st_port.'")
{
document.Go.port.value = "";
}
}
</script>
<form name="Go" method="post" action="'.$_SERVER['PHP_SELF'].'"> 
<tr>
<td width="200" align="right"><input class="tdgo" type="text" name="ip" ';
$verstuurd=0;   
if($verstuurd==1&&!empty($_POST['ip']))
{
echo "value=\"".stripslashes(htmlentities($st_ip))."\"";
}
else
{
echo 'value="'.$st_ip.'"';
}
echo ' size="15" onmouseover="window.status=\''.$standmo.'Change IP | Enter IP\'; return true" onmouseout="window.status=\'\'; true" onclick="ClearIP()" onFocus="ClearIP()"></td>
<td width="100" class="tdbold">:<input class="tdgo" type="text" name="port" ';
if($verstuurd==1&&!empty($_POST['port']))
{
echo "value=\"".stripslashes(htmlentities($st_port))."\"";
}
else
{
echo 'value="'.$st_port.'"';
}
echo ' size="5" maxlength="5" onmouseover="window.status=\''.$standmo.'Change IP | Enter Port\'; return true" onmouseout="window.status=\'\'; true" onclick="ClearPort()" onFocus="ClearPort()"></td>
<td width="100"><input class="tdgo" name="submit" type="submit" value="   Go   " onmouseover="window.status=\''.$standmo.'Change IP | Go\'; return true" onmouseout="window.status=\'\'; true"></td>
</tr>
</form>
</table>
<table width="400" cellpadding="0" cellspacing="0" align="center" class="tablenob">
<tr>
<td height="2"></td>
</tr>
</table><table width="400" cellpadding="0" cellspacing="2" align="center">
<tr>
<td width="100" class="tdbold">Servername:</td>
<td width="300">'.$hostname.'</td>
</tr>
<tr>
<td width="100" class="tdbold">Server-IP:</td>
<td width="300">'.$s_ip.':'.$s_port.'</td>
</tr>
<tr>
<td width="100" class="tdbold">Gametype:</td>
<td width="300">';
if ($gametype == "bel")
{
echo "Behind Enemy Lines";
}
if ($gametype == "dem")
{
echo "Demolition";
}
if ($gametype == "dm")
{
echo "Deathmatch";
}
if ($gametype == "hq")
{
echo "Head Quarters";
}
if ($gametype == "re")
{
echo "Retrieval";
}
if ($gametype == "sd")
{
echo "Search & Destroy";
}
if ($gametype == "tdm")
{
echo "Team Deathmatch";
}
elseif ($gametype != "bel" and $gametype != "dem" and $gametype != "dm" and $gametype != "hq" and $gametype != "re" and $gametype != "sd" and $gametype != "tdm") {
echo $gametype;
}
echo '</td>
</tr>
<tr>
<td width="100" class="tdbold">Killcam:</td>
<td width="300">'.$killcam.'</td>
</tr>
<tr>
<td width="100" class="tdbold">Friendly Fire:</td>
<td width="300">'.$friendlyfire.'</td>
</tr>
<tr>
<td width="100" class="tdbold">Version:</td>
<td width="300">'.$version.'</td>
</tr>
<tr>
<td width="100" class="tdbold">Password:</td>
<td width="300">'.$password.'</td>
</tr>
<tr>
<td width="100" class="tdbold">Punkbuster:</td>
<td width="300">'.$punkbuster.'</td>
</tr>
<tr>
<td width="100" class="tdbold">Players:</td>
<td width="300">'.$playercount.'/'.$maxplayers.'</td>
</tr>
<tr>
<td width="100" class="tdbold">Current map:</td>
<td width="300">'.$mapname.'</td>
</tr>';

if (file_exists("image/" . $mapname . ".gif"))
 {
 echo '<tr>
<td colspan="2" align="center"><img src="image/'.$mapname.'.gif" width="300" height="200"></td>
</tr>';
 } 
else
 { 
 echo '<tr>
<td colspan="2" align="center"><img src="image/custom.gif" width="300" height="200"></td>
</tr>';
 }

// More details
$find_pos = array_search (".Location", $rules);
$location = $rules[$find_pos+1];

$find_pos = array_search (".Admin", $rules);
$admin = $rules[$find_pos+1];

$find_pos = array_search (".Email", $rules);
$email = $rules[$find_pos+1];

$find_pos = array_search ("protocol", $rules);
$protocol = $rules[$find_pos+1];

$find_pos = array_search ("sv_minPing", $rules);
$minping = $rules[$find_pos+1];

$find_pos = array_search ("sv_maxPing", $rules);
$maxping = $rules[$find_pos+1];

$find_pos = array_search ("sv_maxRate", $rules);
$maxrate = $rules[$find_pos+1];

$find_pos = array_search ("sv_privateClients", $rules);
$privateclients = $rules[$find_pos+1];

$find_pos = array_search ("sv_allowAnonymous", $rules);
$allowanonymous = $rules[$find_pos+1];
if($allowanonymous == 1){$allowanonymous = "Yes";}
else{$allowanonymous = "No";}

$find_pos = array_search ("sv_floodProtect", $rules);
$floodprotect = $rules[$find_pos+1];
if($floodprotect == 1){$floodprotect = "Yes";}
else{$floodprotect = "No";}

$find_pos = array_search ("sv_pure", $rules);
$pure = $rules[$find_pos+1];
if($pure == 1){$pure = "Yes";}
else{$pure = "No";}

$find_pos = array_search ("mod", $rules);
$mod = $rules[$find_pos+1];
if($mod == 1){$mod = "Yes";}
else{$mod = "No";}

echo '
<style>
<!--
.linksoff {  display: none }
.linkson {  display: inline }
-->
</style>
<script language="VBscript">
<!--
Option Explicit
DIM menuID,menuObj,cellBk
SUB ShowHide(menuID)
menuObj = "Link" & menuID
cellbk = "Head" & menuID
if document.all.item(menuObj).className = "linkson" then
document.all.item(menuObj).className = "linksoff"
else
document.all.item(menuObj).className = "linkson"   
end if
end sub
-->
</Script>
<tr>
<td width="400" colspan="2" class="tdlink">
<a href="#more" id="head0"  class="heading" onclick="ShowHide(0)" onmouseover="window.status=\''.$standmo.'Click for more details\'; return true" onmouseout="window.status=\'\'; true">Click for more details</a></td>
</tr>
<tr> 
<td width="400" colspan="2">
<div id="Link0" class="linksoff">
<table width="394" cellpadding="0" cellspacing="0" align="center" class="tablenob">
<tr>
<td width="15" rowspan="12"></td>
<td width="130" class="tdbold">Location Server:</td>
<td width="249">';
if ($location == "g_gametype") {
echo 'Unknown';
}
elseif ($location != "g_gametype") {
echo $location;
}
echo '</td>
</tr>
<tr>
<td width="130" class="tdbold">Admin Server:</td>
<td width="249">';
if ($admin == "g_gametype") {
echo 'Unknown';
}
elseif ($admin != "g_gametype") {
echo $admin;
}
echo '</td>
</tr>
<tr>
<td width="130" class="tdbold">Email Admin:</td>
<td width="249" class="tdlinksmall">';
if ($email == "g_gametype") {
echo 'Unknown';
}
elseif ($email != "g_gametype") {
echo '<a href="mailto:'.$email.'" onmouseover="window.status=\''.$standmo.'Email Admin | '.$email.'\'; return true" onmouseout="window.status=\'\'; true">'.$email.'</a>';
}
echo '</td>
</tr>
<tr>
<td width="130" class="tdbold">Protocol:</td>
<td width="249">'.$protocol.'</td>
</tr>
<tr>
<td width="130" class="tdbold">Minimum Ping:</td>
<td width="249">'.$minping.'</td>
</tr>
<tr>
<td width="130" class="tdbold">Maximum Ping:</td>
<td width="249">'.$maxping.'</td>
</tr>
<tr>
<td width="130" class="tdbold">Maximum Rate:</td>
<td width="249">'.$maxrate.'</td>
</tr>
<tr>
<td width="130" class="tdbold">Private Clients:</td>
<td width="249">'.$privateclients.'</td>
</tr>
<tr>
<td width="130" class="tdbold">Allow Anonymous:</td>
<td width="249">'.$allowanonymous.'</td>
</tr>
<tr>
<td width="130" class="tdbold">Flood Protect:</td>
<td width="249">'.$floodprotect.'</td>
</tr>
<tr>
<td width="130" class="tdbold">Pure Server:</td>
<td width="249">'.$pure.'</td>
</tr>
<tr>
<td width="130" class="tdbold">Modded Server:</td>
<td width="249">'.$mod.'</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
<table width="400" cellpadding="0" cellspacing="0" align="center" class="tablenob">
<tr>
<td height="2"></td>
</tr>
</table>
<table width="400" cellpadding="0" cellspacing="2" align="center">
<tr>
<td width="400" colspan="2" align="center">
<script language="javascript">
var pass;
var SSvertOn;
var ssMid = \'\';
if (!SSvertOn) ssMid = \'\';
function joinIn (xip,xgame,xmod,xpass){
if (confirm("To join this server you\'ll need to install some software.\n\n"+
"The software is FREE, so don\'t worry about that.\n\n"+
"If you know that the GameLauncher is installed then \n"+
"click \'OK\' and i\'ll launch the game for you.\n\n"+
"If you need to download and install the software \n"+
"(only 2 minutes download on a 56k, ~930kB)\n"+
"then click \'Cancel\' and i\'ll take you to a website.")){
window.location.href=\'gamelauncher://\'+xip+\';\'+xgame+\';\'+xmod+\';;\';
} else {
win = window.open("http://www.serverspy.net/gamelauncher/?ref=sm", "gamelauncher");
}
}
</script>
<input class="tdgo" onclick="javascript:joinIn(\''.$st_ip.':'.$st_port.'\',\'cod\',\''.$gametypeconnect.'\');" type="button" name="joiner" value="Click To Join Server" onmouseover="window.status=\''.$standmo.'Click To Join Server\'; return true" onmouseout="window.status=\'\'; true"></td>
</tr>
</table>';

// Speler informatie 

echo '<table width="400" cellpadding="0" cellspacing="0" align="center" class="tablenob">
<tr>
<td height="2"></td>
</tr>
</table>
<table style="behavior:url(sort.htc);" width="400" cellpadding="0" cellspacing="1" align="center">';

if ($playercount !=0){

echo '<thead>
<tr>
<td width="280" class="tdlink"><sort><a href="#select" onmouseover="window.status=\''.$standmo.'Sort on Nickname\'; return true" onmouseout="window.status=\'\'; true">Nickname</a></sort></td>
<td width="60" class="tdlink" align="center"><sort><a href="#select" onmouseover="window.status=\''.$standmo.'Sort on Score\'; return true" onmouseout="window.status=\'\'; true">Score</a></sort></td>
<td width="60" class="tdlink" align="center"><sort><a href="#select" onmouseover="window.status=\''.$standmo.'Sort on Ping\'; return true" onmouseout="window.status=\'\'; true">Ping</a></sort></td>
</tr>
</thead>
<tbody>';

$x = 1;

while ($x <= $playercount)
{ 

$x++;

$playerinfo = explode('"',$daten[$x]);

$aantal = tel($playerinfo[1]);
$playerinfo[1] = color($playerinfo[1]);

$gegevens = explode(" ",$playerinfo[0]);
$score = $gegevens[0];
$ping = $gegevens[1];

echo '<tr>
<td width="280" class="tdplayer">'.$playerinfo[1].'</td>
<td width="60" align="center" class="tdplayer">'.$score.'</td>
<td align="center" class="tdplayer">'.$ping.'</td>
</tr>';
}
echo "</tbody>
</table>";
} 
else 
{ 
echo '<tr>
<td class="tdbold" align="center">Sorry, empty server...</td>
</tr>
</table>';
}

if(isset($_GET["ip"]))
 {
 echo '<table width="400" cellpadding="0" cellspacing="0" align="center" class="tablenob">
<tr>
<td height="2"></td>
</tr>
</table>
<table width="400" cellpadding="0" cellspacing="2" align="center">
<tr>
<td align="center" class="tdlink"><a href="stats.php?'.$st_ip.':'.$st_port.'" onmouseover="window.status=\''.$standmo.'Refresh Server Stats\'; return true" onmouseout="window.status=\'\'; true">Refresh Server Stats</a></td>
</tr>
</table>';
 }
else
 {
 echo '<table width="400" cellpadding="0" cellspacing="0" align="center" class="tablenob">
<tr>
<td height="2"></td>
</tr>
</table>
<table width="400" cellpadding="0" cellspacing="2" align="center">
<tr>
<td align="center" class="tdlink"><a href="stats.php?'.$st_ip.':'.$st_port.'" onmouseover="window.status=\''.$standmo.'Refresh Server Stats\'; return true" onmouseout="window.status=\'\'; true">Refresh Server Stats</a></td>
</tr>
</table>';
 }
}
?>
</body>
</html>[/code]