ini_set("display_errors", TRUE);
require_once ('../vendor/koraktor/steam-condenser/lib/steam-condenser.php');
$server = new SourceServer('78.22.56.230');
echo '<pre>';
print_r ($server->getPlayers());
echo '</pre>';
and it gives me player data, but not all the data.
I found that I needed to add the rcon password to the getPlayers method so I changed the following line
print_r ($server->getPlayers());
to (for obvious reasons this is a dummy password, but I entered what I set my server to have as admin password)
Notice: Sending packet of type "A2S_PLAYER_Packet"... in I:\arkserver\arkadmin\htdocs\vendor\koraktor\steam-condenser\lib\steam\sockets\SteamSocket.php on line 142
Notice: Received reply of type "S2C_CHALLENGE_Packet" in I:\arkserver\arkadmin\htdocs\vendor\koraktor\steam-condenser\lib\steam\sockets\SourceSocket.php on line 80
Notice: Expected S2A_PLAYER_Packet, got S2C_CHALLENGE_Packet. in I:\arkserver\arkadmin\htdocs\vendor\koraktor\steam-condenser\lib\steam\servers\GameServer.php on line 317
Notice: Sending packet of type "A2S_PLAYER_Packet"... in I:\arkserver\arkadmin\htdocs\vendor\koraktor\steam-condenser\lib\steam\sockets\SteamSocket.php on line 142
Notice: Received reply of type "S2A_PLAYER_Packet" in I:\arkserver\arkadmin\htdocs\vendor\koraktor\steam-condenser\lib\steam\sockets\SourceSocket.php on line 80
Fatal error: Uncaught exception 'SocketException' with message 'A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
' in I:\arkserver\arkadmin\htdocs\vendor\koraktor\steam-condenser\lib\TCPSocket.php:65
Stack trace:
#0 I:\arkserver\arkadmin\htdocs\vendor\koraktor\steam-condenser\lib\steam\sockets\RCONSocket.php(75): TCPSocket->connect('78.22.56.230', 27015, 1000)
#1 I:\arkserver\arkadmin\htdocs\vendor\koraktor\steam-condenser\lib\steam\servers\SourceServer.php(104): RCONSocket->send(Object(RCONAuthRequest))
#2 I:\arkserver\arkadmin\htdocs\vendor\koraktor\steam-condenser\lib\steam\servers\GameServer.php(425): SourceServer->rconAuth('password')
#3 I:\arkserver\arkadmin\htdocs\vendor\koraktor\steam-condenser\lib\steam\servers\GameServer.php(191): GameServer->updatePlayers('password')
#4 I:\arkserver\arkadmin\htdocs\arkcon\condenser_test.php(15): GameServer->getPlayers('password')
# in I:\arkserver\arkadmin\htdocs\vendor\koraktor\steam-condenser\lib\TCPSocket.php on line 65
on my ARK server Manager I have enabled the RCON port: 32330.
Both 27015 and 32330 are TCP and UDP opened on my router.
No firewall is active when running the script, and if my internet provider or firewall should block it (I'm running the code on a local Bitnami WAMP Stack) shouldn't it also block the RCON commands send by ASM (Ark Server Manager) and ARK Remote admin tool (Both of which are running on my system)?
What am I doing wrong or am I overlooking?
I'll keep searching none the less.