Also bei meiner hp wird immer online angezeigt auch wenn ich den server offline nehme wer kann mir helfen
PHP
- img id="loading" style="margin:0 auto;" src="img/ajax-loader.gif"/>
- <div class="status" style="text-align:left; color:#6b604b; font-size:12pt; padding-left:25px;">
- <table>
- <tr>
- <th></th>
- <th></th>
- <th></th>
- </tr>
- <?php
- $funzocker = "Meine ip Ist Klar";
- $ip = gethostbyname($funzocker);
- $portlist=array(21002, 3306, 23070, 24070, 25070,26070);
- $status=array("Login ", "MySQL ", "Channel 1 ", "Channel 2 ", "Channel 3 ", "Channel 4 ");
- $i=0;
- foreach ($portlist as $port){
- echo '<tr><td width="23px" ><img src="./bilder/statusui.png"></td>';
- echo '<td width="170px; height="35px""><font style="color:#6b604b;">'.$status[$i].'</font></td>';
- $online = @fsockopen($ip, $port, $errno, $errstr, 0);
- if (!$online)
- {
- echo '<td><font style="float:right; padding-right:20px;" color="#2EF70F">Online</font></td>';
- }
- else
- {
- echo '<td><font style="float:right; padding-right:20px;" color="#e90000">Offline</font></td>';
- }
- @fclose($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"));
- $result3 = mysql_fetch_assoc(mysql_query("SELECT COUNT(id) AS count FROM account.account"));
- $result4 = mysql_fetch_assoc(mysql_query("SELECT COUNT(id) AS count FROM player.player"));
- $result5 = mysql_fetch_assoc(mysql_query("SELECT COUNT(id) AS count FROM player.guild"));
- echo '<tr><td width="23px" ><img src="./bilder/statusui.png"></td><td><span style="color:#6b604b">Spieler online:</td><td><span style="color:#4A4130">'.$result1['count'].'</td>';
- echo '<tr><td width="23px" ><img src="./bilder/statusui.png"></td><td><span style="color:#6b604b">Spieler online: (24h):</td><td><span style="color:#4A4130">'.$result2['count'].'</td>';
- echo '<tr><td width="23px" ><img src="./bilder/statusui.png"></td><td><span style="color:#6b604b">Accounts Gesamt:</td><td><span style="color:#4A4130">'.$result3['count'].'</td>';
- echo '<tr><td width="23px" ><img src="./bilder/statusui.png"></td><td><span style="color:#6b604b">Chars Gesamt:</td><td><span style="color:#4A4130">'.$result4['count'].'</td>';
- echo '<tr><td width="23px" ><img src="./bilder/statusui.png"></td><td><span style="color:#6b604b">Gilden Gesamt:</td><td><span style="color:#4A4130">'.$result5['count'].'</td>';
- ?>
- </table>
- </div>
- <input type="submit" class="btn" value="Neuladen" onclick="statusreload()">