du musst nur die config.inc.php anpassen.
In der Status.php stehen nur die Ports auf die er connected um zu sehen ob er eine Rückmeldung bekommt.
PHP Code:
<center>
<?PHP
require("./inc/config.inc.php");
$ip = gethostbyname(SQL_HOST);
$portlist=array(13001);
$i=0;
foreach ($portlist as $port){
$online = @fsockopen($ip, $port, $errno, $errstr, 1);
if (!$online)
{
echo "<div class='off'> Channel1</div>";
}
else
{
echo "<div class='on'> Channel1</div>";
}
@fclose($online);
$i++;
}
echo '<img src="images/sub.png">';
$ip = gethostbyname(SQL_HOST);
$portlist=array(13002);
$i=0;
foreach ($portlist as $port){
$online = @fsockopen($ip, $port, $errno, $errstr, 1);
if (!$online)
{
echo "<div class='off'> Channel2</div>";
}
else
{
echo "<div class='on'> Channel2</div>";
}
@fclose($online);
$i++;
}
echo '<img src="images/sub.png">';
$ip = gethostbyname(SQL_HOST);
$portlist=array(11002);
$i=0;
foreach ($portlist as $port){
$online = @fsockopen($ip, $port, $errno, $errstr, 1);
if (!$online)
{
echo "<div class='off'> World</div>";
}
else
{
echo "<div class='on'> World</div>";
}
@fclose($online);
$i++;
}
echo '<img src="images/sub.png">';
$ip = gethostbyname(SQL_HOST);
$portlist=array(80);
$i=0;
foreach ($portlist as $port){
$online = @fsockopen($ip, $port, $errno, $errstr, 1);
if (!$online)
{
echo "<div class='off'> Patchserver</div>";
}
else
{
echo "<div class='on'> Patchserver</div>";
}
@fclose($online);
$i++;
}
echo '<br><input type="submit" id="status_reload" class="btn" value="Neuladen">
</center>';
?>
So sollte die status.php aussehen.