I wouldn't recommend this approach altough I have no idea how non_stop and lastthief's script works.
This one creates the connection in php and is actually real time. The problem is that if you have 50 users watching the server stats you would also have 50 connections to the gateway (Correct me if i'm wrong it could be that php reuses the connection or something).
A better approach would be to use drew's scripts and create a cron job which executes them like every 5 seconds. What you need to do is modify the index.php (I think) and insert/update the current stats into the database.
This way you have only one connection to the gateway and still real time data. Ofcourse you need to write a ajax script to get them into your browser from the database but that isn't too difficult.
our package contains a c# app which connects to the gateway and gets the capacity then inserting it to the database,and the web script is to get the capacity from the database
our package contains a c# app which connects to the gateway and gets the capacity then inserting it to the database,and the web script is to get the capacity from the database
Cleaner way ^^ (Es gibt auch Object-Orientierung!)
PHP Code:
/** * Gets the server status * * @return bool */ public function getServerStatus() { $sIp = $this->_oConfig->getVar("server_ip"); // Server IP $sPort = $this->_oConfig->getVar("server_port"); // Server port
server status script failure 11/09/2011 - Metin2 Private Server - 0 Replies I'm using this script on a website, and only the MYSQL server is displaying as online.. but all channels and auth is actually online. The site is hosted same place as the server.
The ports are correct but I can't figure out why the script shows everything as offline.
<?PHP
$funzocker = "localhost";
$ip = gethostbyname($funzocker);
$portlist=array(3306 ,11002, 13000, 16000, 18000, 20000);
[Suche] Server Status Script.PHP 02/05/2011 - WoW Private Server - 0 Replies Hallo Community,
ich bin seid ein paar Tage auf der Suche nach einem Script was ich per
PHP auf meine Seite einbinden kann was mir den Status und evlt die Uptime
des WoW Pservers anzeigt. Finde aber leider nichts gutes.
Hat wer so ein Script was gut funktioniert und nicht so super Serverlastig ist ?
Freue mich über jede Hilfe !
Server status script 04/29/2010 - WoW Private Server - 5 Replies Hi wollte mal fragen ob mir vllt jemand ein kleines script basteln könnte. Also php das ich es auf meine hp tun kann.
Es soll Anzeigen wie lange der Server online ist, wie viele Spieler online sind aber getrennt in Horde und Ally. Und noch ne Datenbank Statistik wie viele accounts registriert worden sind.
wäre echt nett wenn mir einer sowas bastenln könnte. Ich hab leider nicht die nötigen php kenntnisse.
mfg Sh4nks
[RELEASE] Server Status Script... 04/30/2009 - Dekaron Private Server - 9 Replies <html>
<body>
Dekaron Server:
<?
Error_reporting(0);
$fp = @fsockopen('INSERT IP HERE', PORT # HERE, $errno, $errstr, 2);
if($fp){ echo '<font color=green>Online</font>'; }
else{ echo '<font color=red>Offline</font>'; }
fclose($fp);
?>