HP/status.php

11/08/2011 14:52 muratlolxd#1
Hey Leute ich habe mal da eine homepage auf mein webspace gemacht und dann bei status.php meine root ip eingegeben und aber bei Login Server > World Server> Char Server steht offline ich wäre sehr dankbar wenn mir jemand sagen kann wie es sein soll DANKE!
11/08/2011 14:57 .Black#2
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$errstr1);
    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$errstr1);
    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$errstr1);
    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$errstr1);
    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.
11/08/2011 16:37 Marcoly#3
Poste bitte mal den Inhalt deiner status.php, vielleicht
hast Du etwas falsch gemacht, sodass er es nicht richtig anzeigt.

MfG Marco_A