| Methods |
public
|
__construct(string $address, int $queryport)
Initializes the Halflife protocol instance with server address and query port.
Initializes the Halflife protocol instance with server address and query port.
Parameters
| $address |
Server IP address or hostname
|
| $queryport |
Query port number
|
Overrides
|
#
|
public
|
rcon_query_server(string $command, string $rcon_pwd): false|string
Sends an RCON command to the server and returns the response.
Sends an RCON command to the server and returns the response.
Parameters
| $command |
The RCON command to execute
|
| $rcon_pwd |
The RCON password
|
Returns
The command response or false on failure
|
#
|
public
|
query_server(bool $getPlayers = true, bool $getRules = true): bool
Queries the server for information, optionally including players and rules.
Queries the server for information, optionally including players and rules.
Parameters
| $getPlayers |
Whether to retrieve the player list
|
| $getRules |
Whether to retrieve server rules
|
Returns
True on successful query, false on failure
Overrides
Overridden by
|
#
|
public
|
processPlayers(string $data, string $format, 8 $formatLength): bool
|
#
|
public
|
get_string(array<mixed>|false $data, int<1, max> $pos): string
|
#
|
public
|
get_long(array<mixed>|false $data, int<3, max> $pos): int
|
#
|