Results 1 to 7 of 7

Thread: PHP send "status server"

  1. #1
    Sergeant maxdamage99's Avatar
    Join Date
    Aug 2014
    Location
    Russia
    Posts
    458
    Thanks
    79
    Thanked 122 Times in 101 Posts

    PHP send "status server"

    How to send "status" server cod2(NO RCON)? with the results:
    1) Number of players
    2) The map / mode
    3) Nicky players / Statistics
    and so on.
    PHP

  2. #2
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,010
    Thanks
    2,102
    Thanked 1,084 Times in 753 Posts
    Basically you just make an UDP request and parse it, e.g. with explode(...)

    Example code could be found in these projects, google for "php rcon call of duty".

    http://callofduty.filefront.com/file...oD4_RCON;84664
    https://ashus.ashus.net/viewtopic.php?t=27
    timescale 0.01

  3. The Following 2 Users Say Thank You to kung foo man For This Useful Post:

    fuleX (4th May 2015),maxdamage99 (4th May 2015)

  4. #3
    Sergeant maxdamage99's Avatar
    Join Date
    Aug 2014
    Location
    Russia
    Posts
    458
    Thanks
    79
    Thanked 122 Times in 101 Posts
    This method is known to me, I thought there is any other!
    But anyway, thank you!

  5. #4
    Sergeant maxdamage99's Avatar
    Join Date
    Aug 2014
    Location
    Russia
    Posts
    458
    Thanks
    79
    Thanked 122 Times in 101 Posts
    But still, it can be done without rcon password?!?!

  6. #5
    Global Mossaderator Mitch's Avatar
    Join Date
    Nov 2012
    Posts
    654
    Thanks
    204
    Thanked 450 Times in 305 Posts
    Quote Originally Posted by maxdamage99 View Post
    But still, it can be done without rcon password?!?!
    Rcon commands, no.
    But none rcon commands like getstatus and getinfo are used without passwords.

    See: http://killtube.org/showthread.php?2...ng-server-info (if you don't like to search it yourself within this forum)

  7. The Following User Says Thank You to Mitch For This Useful Post:

    kung foo man (6th May 2015)

  8. #6
    Private First Class
    Join Date
    Dec 2012
    Posts
    127
    Thanks
    132
    Thanked 114 Times in 63 Posts
    @maxdamage99 You can always use API from services like game-monitor.

    I made an example in PHP:

    PHP Code:
    <?php

        ini_set
    "display_errors"false );

        
    //$host = "192.168.1.2";    // localhost
        //$port = 28960;
        
        
    $host "46.4.55.66";    // evil.High Jump CRACKED
        
    $port 28958;

        
    $serialized file_get_contents"http://module.game-monitor.com/$host:$port/data/server.php" );
        
    $json_data unserialize$serialized );
        
    $array = ( array )$json_data;
        
        if( 
    $array["error"] == )
        {
            
    $hostname $array["name"];
            
    $ip $array["ip"];
            
    $port $array["port"];
            
    $player $array["player"];
            
    $maxplayer $array["maxplayer"];
        
            
    $hostname "<pre>Hostname: $hostname</pre>";
            
    $ip "<pre>IP: $ip:$port</pre>";
            
    $players "<pre>Players: $player/$maxplayer</pre>";
        }
        else
        {
            
    $hostname "<pre>Server offline or wrong IP</pre>";
            
    $ip "<pre>IP: $host:$port</pre>";
        }

    ?>

    <html>
        <body>
            <?php echo $hostname?>
            <?php echo $ip?>
            <?php echo $players?>
        </body>
    </html>

  9. The Following User Says Thank You to Jeplaa For This Useful Post:

    kung foo man (15th May 2015)

  10. #7
    Sergeant maxdamage99's Avatar
    Join Date
    Aug 2014
    Location
    Russia
    Posts
    458
    Thanks
    79
    Thanked 122 Times in 101 Posts
    No thanks, I do not need it! I need a way to himself. There is an option nicks count after mod\1\. But I need to make sure the script is needed!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •