Ich habe Ein problem Mit Meiner Homepage
Bei Der Status Anzeige Sind Drei Dinge Immer Offline Angezeigt Obwohl Alles Online ist:
Hier Der Serverstatus:
Das wird Immer Angezigt Obwohl Alles Online Ist!Quote:
Mysql: Online
Login: Offline
Channel1: Offline
Channel2: Offline
Hier mal Der php Code:
PHP Code:
<p style="margin-left:10px" align="left">
<?PHP
$ip = gethostbyname(SQL_HP_HOST);
$portlist=array(3306); // Den port den ihr sehen wollt
$status=array("<img src='images/pkt.png'> Mysql:"); // Bezeichnung
$i=0;
foreach ($portlist as $port){
echo "".$status[$i]."";
$online = @fsockopen($ip, $port, $errno, $errstr, 1);
if (!$online)
{
echo " <font color='#b02828'>Offline</font>";
}
else
{
echo " <font color='#00FF00'>Online</font>";
}
echo '<br>';
@fclose($online);
$i++;
}
$ip = gethostbyname(SQL_HP_HOST);
$portlist=array(); // Den port den ihr sehen wollt
$status=array("<img src='images/pkt.png'> Login:"); // Bezeichnung
$i=0;
foreach ($portlist as $port){
echo "".$status[$i]."";
$online = @fsockopen($ip, $port, $errno, $errstr, 1);
if (!$online)
{
echo " <font color='#b02828'>Offline</font>";
}
else
{
echo " <font color='#00FF00'>Online</font>";
}
echo '<br>';
@fclose($online);
$i++;
}
$ip = gethostbyname(SQL_HP_HOST);
$portlist=array(15001); // Den port den ihr sehen wollt
$status=array("<img src='images/pkt.png'> Channel1:"); // Bezeichnung
$i=0;
foreach ($portlist as $port){
echo "".$status[$i]."";
$online = @fsockopen($ip, $port, $errno, $errstr, 1);
if (!$online)
{
echo " <font color='#b02828'>Offline</font>";
}
else
{
echo " <font color='#00FF00'>Online</font>";
}
echo '<br>';
@fclose($online);
$i++;
}
$ip = gethostbyname(SQL_HP_HOST);
$portlist=array(16001); // Den port den ihr sehen wollt
$status=array("<img src='images/pkt.png'> Channel2:"); // Bezeichnung
$i=0;
foreach ($portlist as $port){
echo "".$status[$i]."";
$online = @fsockopen($ip, $port, $errno, $errstr, 1);
if (!$online)
{
echo " <font color='#b02828'>Offline</font>";
}
else
{
echo " <font color='#00FF00'>Online</font>";
}
echo '<br>';
@fclose($online);
$i++;
}
?>
</p>
Danke Schonmal Im vorraus






