PHP Code:
<?
$CountOnlineUsersQuery = MySQL_Query("SELECT uid from point where zoneid>-1");
$CountUsers = 0;
WHILE ($UserRows = MySQL_Fetch_Array($CountOnlineUsersQuery)) {
$CountUsers++;
}
$CountAccounts = 0;
$CountAccountsQuery = Mysql_Query("SELECT ID from users where ID>-1");
WHILE ($AccountRows = MySQL_Fetch_Array($CountAccountsQuery)) {
$CountAccounts++;
}
$ServerIP = "IP HERE"; // IP your PW Server
$ServerPort = "PORT HERE"; // Port your PW Server
$Sockres = @FSockOpen($ServerIP, $ServerPort, $errno, $errstr, 1);
if (!$Sockres) {
$Count = 0;
$Status = "<font color=red>Offline</font>";
}
else {
@FClose($Sockres);
$Status = "<font color=green>Online</font>";
}
echo"
<b>Server:</b> $Status <br>
<b>Users Online:</b> $CountUsers <br>
<b>Accounts:</b> $CountAccounts <br>
<br>
<b>Rates:</b><br>
<b>Exp:</b> x9999 <br>
<b>SP:</b> x9999 <br>
<b>Drop:</b> x9999 <br>
<b>Gold:</b> x9999 <br>";
?>