[RELEASE] Very Simple Server Status Script

Results 1 to 19 of 19
  1. #1
    WowIwasSuperCringeB4 XZeenon is offline
    MemberRank
    Jun 2008 Join Date
    CanadaLocation
    1,405Posts

    [RELEASE] Very Simple Server Status Script

    Ok, this is a very simple script that i made for gunz server status.

    you can download it from the attachments.

    the README.txt Contains this.

    Made by XZeenon.
    Please do not claim this as your own.

    Instructions.

    Open Index.php with your favorite text reader.
    then edit 127.0.0.1 to your server's IP adress.
    Secondly edit your port to be excact same as your gunz server port.
    Save it upload it to your host and your done!

    Please thank me. XZeenon.

    P.S. You may use the images I have made.

    Basically when the server is offline it has an image and something that says online or offline

    like this

    and this



    so here it is download from attachments.
    Attached Files Attached Files
    Last edited by XZeenon; 23-07-08 at 05:09 AM.


  2. #2
    WowIwasSuperCringeB4 XZeenon is offline
    MemberRank
    Jun 2008 Join Date
    CanadaLocation
    1,405Posts

    Re: [RELEASE] Very Simple Server Status Script

    Sorry for double post but people please give me feed back?

  3. #3
    Mocro.net Mocro is offline
    MemberRank
    Feb 2008 Join Date
    Amsterdam.Location
    891Posts

    Re: [RELEASE] Very Simple Server Status Script

    Looks cool gonne try this

  4. #4
    Account Upgraded | Title Enabled! holdenms is offline
    MemberRank
    Apr 2008 Join Date
    MaineLocation
    264Posts

    Re: [RELEASE] Very Simple Server Status Script

    that's easy as pie XD i knew how to do that

  5. #5
    WowIwasSuperCringeB4 XZeenon is offline
    MemberRank
    Jun 2008 Join Date
    CanadaLocation
    1,405Posts

    Re: [RELEASE] Very Simple Server Status Script

    Quote Originally Posted by holdenms View Post
    that's easy as pie XD i knew how to do that
    umm that's why i said it was a simple script...
    what isn't easy to make for you probobally is the graphix.
    so HA HA

  6. #6
    Mako is insane. ThePhailure772 is offline
    MemberRank
    Sep 2007 Join Date
    1,115Posts

    Re: [RELEASE] Very Simple Server Status Script

    $f = @fsockopen("myip",port);
    if($f) echo 'Server online';
    else echo 'Server offlie';

    ez

  7. #7
    WowIwasSuperCringeB4 XZeenon is offline
    MemberRank
    Jun 2008 Join Date
    CanadaLocation
    1,405Posts

    Re: [RELEASE] Very Simple Server Status Script

    Wow, don't people read?
    W/e, The thing about this is that i made it have pics.

  8. #8
    Member Z3ZO is offline
    MemberRank
    Jan 2008 Join Date
    IsraelLocation
    60Posts

    Re: [RELEASE] Very Simple Server Status Script

    Graphics - it's a joke [ for people like me ]

  9. #9
    WowIwasSuperCringeB4 XZeenon is offline
    MemberRank
    Jun 2008 Join Date
    CanadaLocation
    1,405Posts

    Re: [RELEASE] Very Simple Server Status Script

    Quote Originally Posted by Z3ZO View Post
    Graphics - it's a joke [ for people like me ]
    Huh? That made no sence at all.

  10. #10
    Account Upgraded | Title Enabled! yurij13 is offline
    MemberRank
    Jul 2007 Join Date
    387Posts

    Re: [RELEASE] Very Simple Server Status Script

    wtf ho wdo i put the onlien stats and ofline were do i put it?

  11. #11
    Extreme Coder - Delphi bounty-hunter is offline
    MemberRank
    Sep 2007 Join Date
    GunZone MansionLocation
    1,725Posts

    Re: [RELEASE] Very Simple Server Status Script

    its shit, please close this topic

  12. #12
    Unleashed jumparound is offline
    MemberRank
    Feb 2008 Join Date
    UtrechtLocation
    499Posts

    Re: [RELEASE] Very Simple Server Status Script

    wow its not shit, many people just wait for this ( most of them the noob ucoz servers lol )

    and lol aziz and xzeenon in 1 topic... xD

  13. #13
    Apprentice darkagent is offline
    MemberRank
    Jul 2005 Join Date
    RussiaLocation
    17Posts

    Re: [RELEASE] Very Simple Server Status Script

    i'm using sqlExpress2005 + iis + php5 with php_pdo_odbc enabled (php_mssql just dies on my priv.serv.)
    so i just moded simple status/statistic for use with ODBC;
    this code-part can be used as module in site ;)
    it shows : server status, total accounts, total chars, current online and top10 of chars (by exp);

    if it useful to someone - just say thx =)
    p.s. sorry for my bad english :)
    PHP Code:
    <?
    $hostname 
    '127.0.0.1';
    $servers = Array('DeathMatch'=>6000'TestServer'=>6002);
    $odbclogin 'sa'// you can change it to any user allowed to access your DB
    $odbcpass 'pass'// pass for your DB user
    $odbcdriver 'SQL Native Client'// see it in odbc administration utility; example is for my sql-express2005 instance ;)
    $odbc_dsn 'game'// just name of odbc-instance in your "system dsn" for your game-server; i use it both for matchserver and website; name of default database configured in odbc instance;

    function gt($a) {
    // this only for simple time formating ;)
        
    $hours=floor($a/3600);
        
    $mins=floor(($a-($hours*3600))/60);
        return 
    "$hours h/$mins mins";
    }

    $status='';
    foreach(
    $servers as $sname => $port)
    {
        
    $connection = @fsockopen($hostname$port$errno$errstr0.003);
        if(!
    $connection$status '<span class="OFFLINE">ONLINE</span>'; else $status '<span class="ONLINE">ONLINE</span>';
        
    $status.= $sname ' - ' $status '<br />';
    }

    try {
        
    $conn = new PDO("odbc:dsn=$odbc_dsn;driver=$odbcdriver"$odbclogin,$odbcpass);
        
    $conn->setAttribute(PDO::ATTR_ERRMODEPDO::ERRMODE_EXCEPTION);
    } catch (
    PDOException $e) { $data "ODBC error: " $e->getMessage(); $error=1;    }

    $cmd="select count(*) as total from login";

    $accounts=0;

    try {
        
    $query $conn->prepare($cmd);
        
    $query->execute();
    } catch (
    PDOException $e) { die("ODBC error: ".$e->getMessage()); };

    if (
    $query->columnCount()>0) { while ($in=$query->fetch()) $accounts=$in['total'];} 
    $query=null;

    $cmd="select top 1 * from ServerStatus";
    $online=0;
    try {
        
    $query $conn->prepare($cmd);
        
    $query->execute();
    } catch (
    PDOException $e) { die("ODBC error: ".$e->getMessage()); };

    if (
    $query->columnCount()>0) { while ($in=$query->fetch()) $online=$in[1];} 

    $query=null;

    $cmd="select count(*) as total from Character";

    $chars=0;

    try {
        
    $query $conn->prepare($cmd);
        
    $query->execute();
    } catch (
    PDOException $e) { die("ODBC error: ".$e->getMessage()); };

    if (
    $query->columnCount()>0) { while ($in=$query->fetch()) $chars=$in['total'];} 

    $query=null;

    $char=array();
    $toplist='';

    $cmd="select top 10 * from Character where DeleteFlag=0 order by XP desc";
    $cnt=0;
    try {
        
    $query $conn->prepare($cmd);
        
    $query->execute();
    } catch (
    PDOException $e) { die("ODBC error: ".$e->getMessage()); };
    if (
    $query->columnCount()>0) { 
        
    $toplist='<table align="center" style="border:3px double #aaa;padding:3px;">
        <tr><td colspan="6"><h3>TOP 10 Characters</h3></td></tr>
        <tr><td>Char Name</td><td>Level</td><td>XP</td><td>Game  Time</td><td>Kills</td><td>Dies</td></tr>'
    ;
        while (
    $in=$query->fetch()) {
            
    $char=$in;
            if (
    $char['Sex']==0$cl='male'; else $cl='female';
            
    $toplist.="<tr><td class='$cl'>".$char['Name']."</td><td><b>".$char['Level']."</b></td><td>".$char['XP']."</td><td>".gt($char['PlayTime'])."</td><td>".$char['KillCount']."</td><td>".$char['DeathCount']."</td></tr>";
        }
        
    $toplist.='</table>';


    $query=null;


    $conn=null;
    echo 
    "
    <style type='text/css'>
    <!--
    td { padding:2pt; text-align:center;}
    td.male { color: blue; }
    td.female { color: magenta; } 
    -->
    </style>
    <div style='padding:5pt;text-align:center;'>
    <b>Server status:</b> 
    $status<br/>
    <b>Total accounts:</b> 
    $accounts<br/>
    <b>Total characters:</b> 
    $chars<br/>
    <b>Current online:</b> 
    $online<br/>
    <br/>
    <br/>
    "
    .$toplist."</div>";

    ?>

  14. #14
    Proficient Member tagerinator is offline
    MemberRank
    Nov 2007 Join Date
    Canada FTW!Location
    199Posts

    Re: [RELEASE] Very Simple Server Status Script

    Darkagent, I suggest you should make your own topic and post it.

  15. #15
    Apprentice darkagent is offline
    MemberRank
    Jul 2005 Join Date
    RussiaLocation
    17Posts

    Re: [RELEASE] Very Simple Server Status Script

    Quote Originally Posted by tagerinator View Post
    Darkagent, I suggest you should make your own topic and post it.
    and clone same subjs for many times ) i don't pretend to be an original code writer, i'm just took somethin and moded it.

  16. #16
    Proficient Member DragonOfBlade is offline
    MemberRank
    Jun 2007 Join Date
    191Posts

    Re: [RELEASE] Very Simple Server Status Script

    You can still release it.

  17. #17
    WowIwasSuperCringeB4 XZeenon is offline
    MemberRank
    Jun 2008 Join Date
    CanadaLocation
    1,405Posts

    Re: [RELEASE] Very Simple Server Status Script

    wow shit this thread is old.
    I'm ashamed of these gfx....
    Anyway owell.. Good luck. Im pro now at gfx :P

  18. #18
    Member Neoz is offline
    MemberRank
    Jul 2008 Join Date
    In Yours and Truly Yours DreamLocation
    78Posts

    Re: [RELEASE] Very Simple Server Status Script

    Quote Originally Posted by yurij13 View Post
    wtf ho wdo i put the onlien stats and ofline were do i put it?
    Why Did he Revive 3 month old thread Please Close it Ty =)

  19. #19
    Proficient Member HigherGamers is offline
    MemberRank
    Apr 2008 Join Date
    http://reborn-gamerz.co.ukLocation
    190Posts

    Re: [RELEASE] Very Simple Server Status Script

    Once again XZeenon, you amazed me :D. I am gonna use this :P



Advertisement