View Single Post
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 02-16-2020 , 18:03   Re: Get players and steam id with php rcon
Reply With Quote #16

Ok, so based on the unedited status output that you gave me in PM, I found that your server was adding random spaces into the player list section of the status output.

I've updated my function here to account for this extra whitespace.

Now you can use the result to loop through all the players and get the data you need:

PHP Code:
$status parse_hlds_status($myStatus);
foreach( 
$status['Players'] as $player)
{
    print(
$player['name'] . "\t" $player['uniqueid'] . "\n");

__________________

Last edited by fysiks; 02-16-2020 at 18:08.
fysiks is offline