Quote:
Originally Posted by _nQQpls
Zeig uns doch mal Deine aktuelle status.inc.php - Dann erweitere ich sie Dir eben.
|
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<?php
$serverip = "xxx.xxx.xx.xxx";
$ip = gethostbyname($serverip);
$portlist=array(15001,25001,23070,3306); // Ports
$status=array("Login Server:", "Char Server:", "World Server:", "Mysql Server:"); // Bezeichnung
$i=0;
echo '<table style="border-spacing:0px;border-collapse:inherit;"><tbody>';
foreach ($portlist as $port){
$online = @

ckopen($ip, $port, $errno, $errstr, 1);
if ($online)
{
echo '<tr style="height:20px;line-height:20px;"><td>'.$status[$i].'</td><td><span style="color:green;">Online</span></td></tr>';
}
else
{
echo '<tr style="height:20px;line-height:20px;"><td>'.$status[$i].'</td><td><span style="color:red;">Offline</span></td></tr>';
}
@

ose($online);
$i++;
}
$result1 = mysql_fetch_assoc(mysql_query("SELECT COUNT(id) AS count FROM player.player WHERE DATE_SUB(NOW(), INTERVAL 5 MINUTE) < last_play"));
$result2 = mysql_fetch_assoc(mysql_query("SELECT COUNT(id) AS count FROM player.player WHERE DATE_SUB(NOW(), INTERVAL 24 HOUR) < last_play"));
echo '<tr style="height:20px;line-height:20px;"><td>Spieler online:</td><td>'.$result1['count'].'</td>';
echo '<tr style="height:20px;line-height:20px;"><td>Spieler online: (24h):</td><td>'.$result2['count'].'</td>';
echo '<tr style="height:20px;line-height:20px;"><td>Accounts Gesamt:</td><td>'.$result3['count'].'</td>';
echo '<tr style="height:20px;line-height:20px;"><td>Chars Gesamt:</td><td>'.$result4['count'].'</td>';
echo '<tr style="height:20px;line-height:20px;"><td>Gilden Gesamt:</td><td>'.$result5['count'].'</td>';
echo '<tr style="height:20px;line-height:20px;"><td>Yang Gesamt:</td><td>'.$result6['count'].'</td>';
?>
ANzeigen tut er aufgrund dessen das ich nicht weiß wie ich das abfrage nur Spieler Online und Spieler Online letzte 24h
Ich hab unter Accounts gesamt schon versucht die Tabelle Accounts.Accounts aus zu lesen aber leider erfolglos.