Register for your free account! | Forgot your password?
Rust Cheats
Rust Cheats

You last visited: Today at 15:57

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



server status php?

Discussion on server status php? within the Metin2 Private Server forum part of the Metin2 category.

Reply
 
Old   #1
 
.x3Bit's Avatar
 
elite*gold: 2
Join Date: Apr 2012
Posts: 195
Received Thanks: 134
server status php?

Hay ich ne kleine frage...
PHP Code:
<?PHP
include "./inc/dbsettings.php";
$ip gethostbyname($serverip1);
$portlist=array(13001);
$onliner=array("Channel 1");
$server=array("Channel 1");
$i=0;
foreach  (
$portlist as $port){
    
$online = @fsockopen($ip$port$errno$errstr1);
    if (!
$online)
    {
        echo 
"<span class='offline tooltip' title='$onliner[$i] ist offline.'>&bull; $onliner[$i]</span><br />";
        $
$onliner[$i] = "0";
    }
    else
    {
        echo 
"<span class='online tooltip' title='$onliner[$i] ist online.'>&bull; $onliner[$i]</span><br />";
        $
$onliner[$i] = "1";
    }
    @
fclose($online);
$i++;
}
?>
wie kriege ich es hin das wen der server on is das, dass Online in grün angezeigt wird? wen ich
PHP Code:
<font color="green"> </font
dahin packe gehts net >_>
.x3Bit is offline  
Old 04/21/2012, 03:20   #2
 
Anonyme™'s Avatar
 
elite*gold: 310
Join Date: May 2011
Posts: 1,592
Received Thanks: 105
Ich finde deine Status.php ein Bisschen Komisch(Fail^^)

Deshalb probier mal diese Hier.

PHP Code:
        <?php
        $ip 
gethostbyname(SQL_HOST);
        
$portlist=array(3306,1100213000, ); // Den port den ihr sehen wollt
        
$status=array("LOGIN:""CHAR:""WORLD:");  // Bezeichnung
        
$i=0;
        
mysql_select_db("player");
        
$output mysql_query("SELECT COUNT(*) as count FROM player WHERE DATE_SUB(NOW(), INTERVAL 5 MINUTE) < last_play;");
        
$online_count mysql_fetch_object($output)->count+1;
        echo 
"<p>Es sind  <font color=#6c9ffd> $online_count</font> Spieler Online </p>";

    foreach  (
$portlist as $port){
    echo 
"<p><font>".$status[$i]."</font>";
        
$online = @fsockopen($ip$port$errno$errstr1);
    if (!
$online)
    {
        echo 
"<font color=#008000> ONLINE </font></p>"
        
;

    }
    else
    {
        echo 
"<font color=#8b0000> OFFLINE </font></p> ";
    }
        @
fclose($online);
        
$i++;
    }  
    
?>
Hoffe konnte dir damit Helfen

MFG
Flingernboy
Anonyme™ is offline  
Old 04/21/2012, 04:16   #3
 
.x3Bit's Avatar
 
elite*gold: 2
Join Date: Apr 2012
Posts: 195
Received Thanks: 134
Ne das is mega hässlich xD
.x3Bit is offline  
Old 04/21/2012, 04:23   #4
 
Anonyme™'s Avatar
 
elite*gold: 310
Join Date: May 2011
Posts: 1,592
Received Thanks: 105
Nee Meine Status.php is Viel besser !

Habe dich Skype Hinzugefügt. Würde mich freuen, Wen du Annehmen würdest

MFG
Flingernboy
Anonyme™ is offline  
Old 04/21/2012, 04:29   #5
 
Hyukisawa's Avatar
 
elite*gold: 133
Join Date: May 2007
Posts: 506
Received Thanks: 194
PHP Code:
<?PHP 
include "./inc/dbsettings.php"
$ip gethostbyname($serverip1);
$portlist=array(13001); 
$onliner=array("Channel 1"); 
$server=array("Channel 1"); 
$i=0
foreach  (
$portlist as $port){ 
    
$online = @fsockopen($ip$port$errno$errstr1); 
    if (!
$online
    { 
        echo 
"<span class='offline tooltip' title='$onliner[$i] ist offline.'>&bull; <font color='red'>$onliner[$i]</font></span><br />"
        $
$onliner[$i] = "0"
    } 
    else 
    { 
        echo 
"<span class='online tooltip' title='$onliner[$i] ist online.'>&bull; <font color='green'>$onliner[$i]</font></span><br />"
        $
$onliner[$i] = "1"
    } 
    @
fclose($online); 
$i++; 

?>
so sollte es gehen
Hyukisawa is offline  
Old 04/21/2012, 08:56   #6
 
.BonG™'s Avatar
 
elite*gold: 0
The Black Market: 130/2/1
Join Date: Oct 2011
Posts: 3,360
Received Thanks: 826
Es geht eigendlich viel leichter und kleiner, aber ich poste es einfach mal:


Lg
.BonG™ is offline  
Thanks
3 Users
Old 02/13/2014, 15:15   #7
 
elite*gold: 0
Join Date: Oct 2010
Posts: 54
Received Thanks: 0
Metin2 Homepage status hilfe

Bitte um Hilfe weiß nicht was da falsch ist :/

PHP Code:
<img style="margin-top:15px;" id="loading" src="./img/loading.gif"/>
<div class="online-status" style="font-size:12px;">
<div id="status_pos">
<?php

        $ip 
gethostbyname($serverSettings['25.136.93.190']);
        
$portlist=array(3306,11002,13001,13002); // Ports
        
$status=array("Mysql Server:""Login Server:""Channel1:""Channel2:");  // Bezeichnung
        
$i=0;


    foreach  (
$portlist as $port){

        
$online = @fsockopen($ip$port$errno$errstr1);
    if (
$online)
    {
    echo 
'<div id="status_bar">';
        echo 
'<tr>'.$status[$i].
        <font color="#04bc00">Online</font>
        '
;
    echo 
'</div>';
    }
    else
    {
    echo 
'<div id="status_bar">';
        echo 
'<tr>'.$status[$i].'  
        <font color="#cf0000">Offline</font>
        '
;
    echo 
'</div>';
    }
        @
fclose($online);
        
$i++;
    }

    
?>
<div id="status_bar">
<?php
    $result1 
mysql_fetch_assoc(mysql_query("SELECT COUNT(id) AS count FROM player.player WHERE DATE_SUB(NOW(), INTERVAL 5 MINUTE) < last_play"));
        echo 
'Spieler Online: <font color="#749db7">'.$result1['count'].' </font>';

?>
</div>
</div>
</div>
rudik1234 is offline  
Reply


Similar Threads Similar Threads
Reg Page Edited Server Status + Extra Status
08/26/2012 - SRO Coding Corner - 22 Replies
This is a new realease of the reg page created by Xsense Download XAMP apache friends - xampp for windows Reg Page Files (By Tazdingo And Xsense) : Multiupload.com - upload your files to multiple file hosting sites! 1. Install XAMP 2. Go to the PHP folder of the xampplite (C:\xampplite\php) and search PHP.ini 3. In the PHP.ini search ;extension=php_mssql.dl and delete ";"
[Server Status] Server Status Programs From A Couple Servers.
11/05/2008 - Conquer Online 2 - 9 Replies
Hey i dont know in what section to post it so i hope that the mods will move it to the good section but i made this server status program i will make later more server status programs for other servers. PhoenixCo: Server Checker Qonquer Qonquer Server Checker Screenshot: http://i286.photobucket.com/albums/ll115/aschwinh /sdfsdfsdf.jpg



All times are GMT +1. The time now is 15:58.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.