Fatal error: Class 'GoldSrcServer' not found in

116 views
Skip to first unread message

Javier Salas

unread,
Jun 30, 2016, 2:37:57 PM6/30/16
to Steam Condenser
Hello, first time messing around with php so I'm sure I messed something. I was wondering if someone could help me with the error I'm getting:



Fatal error: Class 'GoldSrcServer' not found in C:\xampp\htdocs\steam-condenser\321.php on line 10
condenser: steam dedicated server bootstrapper
Play
Install Composer into XAMPP 1.8.3 on Windows 7 + Laravel and Yii2
Play
Install Composer on Windows
Play

My php looks like this 

<html>
 <head>
  <title>PHP Test</title>
 </head>
 <body>
 <?php 
 
 
 
$server = new GoldSrcServer('192.168.0.114', 27016);
$server->initialize();
echo $server->getPlayers();


 ?> 
 </body>
</html>

I used composer to install steam-condenser on my xampp/htdocs

Any help would be greatly appreciated!

Sebastian Staudt

unread,
Jul 1, 2016, 5:10:08 AM7/1/16
to Steam Condenser
Hi Javier,

if this is your complete code, you're definitely missing a require statement.
You should take a look at Composer's documentation: https://getcomposer.org/doc/01-basic-usage.md#autoloading

Best regards,
    Sebastian

--
You received this message because you are subscribed to the Google Groups "Steam Condenser" group.
To unsubscribe from this group and stop receiving emails from it, send an email to steam-condens...@googlegroups.com.
To post to this group, send email to steam-c...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/steam-condenser/f512401a-6dbd-4b65-a7de-9f4eb0b4d630%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Javier Salas

unread,
Jul 1, 2016, 11:46:05 AM7/1/16
to Steam Condenser
Thanks for the reply. I was able to install it correctly but I'm not sure it's working at intended..




( ! ) Notice: Sending packet of type "A2S_INFO_Packet"... in C:\xampp\htdocs\steam-condenser-php-1.3.10\lib\steam\sockets\SteamSocket.php on line 142
Call Stack
#TimeMemoryFunctionLocation
10.0009132880{main}( )...\test.php:0
20.01781033536GameServer->initialize( )...\test.php:12
30.01781033600GameServer->updatePing( )...\GameServer.php:249
40.01791034000GameServer->sendRequest( )...\GameServer.php:395
50.01791034040SteamSocket->send( )...\GameServer.php:365
60.01791034160trigger_error ( )...\SteamSocket.php:142

( ! ) Notice: Received reply of type "S2A_INFO2_Packet" in C:\xampp\htdocs\steam-condenser-php-1.3.10\lib\steam\sockets\SourceSocket.php on line 80
Call Stack
#TimeMemoryFunctionLocation
10.0009132880{main}( )...\test.php:0
20.01781033536GameServer->initialize( )...\test.php:12
30.01781033600GameServer->updatePing( )...\GameServer.php:249
40.01891033912GameServer->getReply( )...\GameServer.php:397
50.01891034152SourceSocket->getReply( )...\GameServer.php:260
60.07281048104trigger_error ( )...\SourceSocket.php:80

( ! ) Notice: Sending packet of type "A2S_INFO_Packet"... in C:\xampp\htdocs\steam-condenser-php-1.3.10\lib\steam\sockets\SteamSocket.php on line 142
Call Stack
#TimeMemoryFunctionLocation
10.0009132880{main}( )...\test.php:0
20.01781033536GameServer->initialize( )...\test.php:12
30.07371045544GameServer->updateServerInfo( )...\GameServer.php:250
40.07371045776GameServer->handleResponseForRequest( )...\GameServer.php:472
50.07371046184GameServer->sendRequest( )...\GameServer.php:300
60.07371046184SteamSocket->send( )...\GameServer.php:365
70.07371046304trigger_error ( )...\SteamSocket.php:142

( ! ) Notice: Received reply of type "S2A_INFO2_Packet" in C:\xampp\htdocs\steam-condenser-php-1.3.10\lib\steam\sockets\SourceSocket.php on line 80
Call Stack
#TimeMemoryFunctionLocation
10.0009132880{main}( )...\test.php:0
20.01781033536GameServer->initialize( )...\test.php:12
30.07371045544GameServer->updateServerInfo( )...\GameServer.php:250
40.07371045776GameServer->handleResponseForRequest( )...\GameServer.php:472
50.07461046184GameServer->getReply( )...\GameServer.php:302
60.07461046184SourceSocket->getReply( )...\GameServer.php:260
70.11821048856trigger_error ( )...\SourceSocket.php:80

( ! ) Notice: Sending packet of type "A2S_PLAYER_Packet"... in C:\xampp\htdocs\steam-condenser-php-1.3.10\lib\steam\sockets\SteamSocket.php on line 142
Call Stack
#TimeMemoryFunctionLocation
10.0009132880{main}( )...\test.php:0
20.01781033536GameServer->initialize( )...\test.php:12
30.11931047816GameServer->updateChallengeNumber( )...\GameServer.php:251
40.11931047848GameServer->handleResponseForRequest( )...\GameServer.php:380
50.11931048240GameServer->sendRequest( )...\GameServer.php:300
60.11931048240SteamSocket->send( )...\GameServer.php:365
70.11931048360trigger_error ( )...\SteamSocket.php:142

( ! ) Notice: Received reply of type "S2C_CHALLENGE_Packet" in C:\xampp\htdocs\steam-condenser-php-1.3.10\lib\steam\sockets\SourceSocket.php on line 80
Call Stack
#TimeMemoryFunctionLocation
10.0009132880{main}( )...\test.php:0
20.01781033536GameServer->initialize( )...\test.php:12
30.11931047816GameServer->updateChallengeNumber( )...\GameServer.php:251
40.11931047848GameServer->handleResponseForRequest( )...\GameServer.php:380
50.12031048280GameServer->getReply( )...\GameServer.php:302
60.12031048280SourceSocket->getReply( )...\GameServer.php:260
70.17741048744trigger_error ( )...\SourceSocket.php:80

( ! ) Notice: Sending packet of type "A2S_PLAYER_Packet"... in C:\xampp\htdocs\steam-condenser-php-1.3.10\lib\steam\sockets\SteamSocket.php on line 142
Call Stack
#TimeMemoryFunctionLocation
10.0009132880{main}( )...\test.php:0
20.17831047952GameServer->getPlayers( )...\test.php:13
30.17831048096GameServer->updatePlayers( )...\GameServer.php:191
40.17831048128GameServer->handleResponseForRequest( )...\GameServer.php:419
50.17841048472GameServer->sendRequest( )...\GameServer.php:300
60.17841048472SteamSocket->send( )...\GameServer.php:365
70.17841048592trigger_error ( )...\SteamSocket.php:142

( ! ) Notice: Received reply of type "S2A_PLAYER_Packet" in C:\xampp\htdocs\steam-condenser-php-1.3.10\lib\steam\sockets\SourceSocket.php on line 80
Call Stack
#TimeMemoryFunctionLocation
10.0009132880{main}( )...\test.php:0
20.17831047952GameServer->getPlayers( )...\test.php:13
30.17831048096GameServer->updatePlayers( )...\GameServer.php:191
40.17831048128GameServer->handleResponseForRequest( )...\GameServer.php:419
50.17921048472GameServer->getReply( )...\GameServer.php:302
60.17921048472SourceSocket->getReply( )...\GameServer.php:260
70.22351056384trigger_error ( )...\SourceSocket.php:80
Array ( [BIG DADDY DIRT PILE] => SteamPlayer Object ( [clientPort:SteamPlayer:private] => [connectTime:SteamPlayer:private] => 1712.0838623047 [extended:SteamPlayer:private] => [id:SteamPlayer:private] => 0 [ipAddress:SteamPlayer:private] => [loss:SteamPlayer:private] => [name:SteamPlayer:private] => BIG DADDY DIRT PILE [ping:SteamPlayer:private] => [rate:SteamPlayer:private] => [realId:SteamPlayer:private] => [score:SteamPlayer:private] => 17 [state:SteamPlayer:private] => [steamId:SteamPlayer:private] => ) [Shayminz] => SteamPlayer Object ( [clientPort:SteamPlayer:private] => [connectTime:SteamPlayer:private] => 1274.3239746094 [extended:SteamPlayer:private] => [id:SteamPlayer:private] => 0 [ipAddress:SteamPlayer:private] => [loss:SteamPlayer:private] => [name:SteamPlayer:private] => Shayminz [ping:SteamPlayer:private] => [rate:SteamPlayer:private] => [realId:SteamPlayer:private] => [score:SteamPlayer:private] => 3 [state:SteamPlayer:private] => [steamId:SteamPlayer:private] => ) [beckettsloan] => SteamPlayer Object ( [clientPort:SteamPlayer:private] => [connectTime:SteamPlayer:private] => 793.46978759766 [extended:SteamPlayer:private] => [id:SteamPlayer:private] => 0 [ipAddress:SteamPlayer:private] => [loss:SteamPlayer:private] => [name:SteamPlayer:private] => beckettsloan [ping:SteamPlayer:private] => [rate:SteamPlayer:private] => [realId:SteamPlayer:private] => [score:SteamPlayer:private] => 2 [state:SteamPlayer:private] => [steamId:SteamPlayer:private] => ) [Piza_plebzzz] => SteamPlayer Object ( [clientPort:SteamPlayer:private] => [connectTime:SteamPlayer:private] => 655.48480224609 [extended:SteamPlayer:private] => [id:SteamPlayer:private] => 0 [ipAddress:SteamPlayer:private] => [loss:SteamPlayer:private] => [name:SteamPlayer:private] => Piza_plebzzz [ping:SteamPlayer:private] => [rate:SteamPlayer:private] => [realId:SteamPlayer:private] => [score:SteamPlayer:private] => 6 [state:SteamPlayer:private] => [steamId:SteamPlayer:private] => ) [Kaliforniyum(Cf)] => SteamPlayer Object ( [clientPort:SteamPlayer:private] => [connectTime:SteamPlayer:private] => 434.62490844727 [extended:SteamPlayer:private] => [id:SteamPlayer:private] => 0 [ipAddress:SteamPlayer:private] => [loss:SteamPlayer:private] => [name:SteamPlayer:private] => Kaliforniyum(Cf) [ping:SteamPlayer:private] => [rate:SteamPlayer:private] => [realId:SteamPlayer:private] => [score:SteamPlayer:private] => 3 [state:SteamPlayer:private] => [steamId:SteamPlayer:private] => ) [The Pussy Cat] => SteamPlayer Object ( [clientPort:SteamPlayer:private] => [connectTime:SteamPlayer:private] => 319.13973999023 [extended:SteamPlayer:private] => [id:SteamPlayer:private] => 0 [ipAddress:SteamPlayer:private] => [loss:SteamPlayer:private] => [name:SteamPlayer:private] => The Pussy Cat [ping:SteamPlayer:private] => [rate:SteamPlayer:private] => [realId:SteamPlayer:private] => [score:SteamPlayer:private] => 17 [state:SteamPlayer:private] => [steamId:SteamPlayer:private] => ) [MisterKronos] => SteamPlayer Object ( [clientPort:SteamPlayer:private] => [connectTime:SteamPlayer:private] => 271.30484008789 [extended:SteamPlayer:private] => [id:SteamPlayer:private] => 0 [ipAddress:SteamPlayer:private] => [loss:SteamPlayer:private] => [name:SteamPlayer:private] => MisterKronos [ping:SteamPlayer:private] => [rate:SteamPlayer:private] => [realId:SteamPlayer:private] => [score:SteamPlayer:private] => 7 [state:SteamPlayer:private] => [steamId:SteamPlayer:private] => ) [{BG}Alexlucky] => SteamPlayer Object ( [clientPort:SteamPlayer:private] => [connectTime:SteamPlayer:private] => 268.2448425293 [extended:SteamPlayer:private] => [id:SteamPlayer:private] => 0 [ipAddress:SteamPlayer:private] => [loss:SteamPlayer:private] => [name:SteamPlayer:private] => {BG}Alexlucky [ping:SteamPlayer:private] => [rate:SteamPlayer:private] => [realId:SteamPlayer:private] => [score:SteamPlayer:private] => 1 [state:SteamPlayer:private] => [steamId:SteamPlayer:private] => ) [jeremy.lewisson] => SteamPlayer Object ( [clientPort:SteamPlayer:private] => [connectTime:SteamPlayer:private] => 234.35980224609 [extended:SteamPlayer:private] => [id:SteamPlayer:private] => 0 [ipAddress:SteamPlayer:private] => [loss:SteamPlayer:private] => [name:SteamPlayer:private] => jeremy.lewisson [ping:SteamPlayer:private] => [rate:SteamPlayer:private] => [realId:SteamPlayer:private] => [score:SteamPlayer:private] => 0 [state:SteamPlayer:private] => [steamId:SteamPlayer:private] => ) [oreo_monkey] => SteamPlayer Object ( [clientPort:SteamPlayer:private] => [connectTime:SteamPlayer:private] => 123.23983001709 [extended:SteamPlayer:private] => [id:SteamPlayer:private] => 0 [ipAddress:SteamPlayer:private] => [loss:SteamPlayer:private] => [name:SteamPlayer:private] => oreo_monkey [ping:SteamPlayer:private] => [rate:SteamPlayer:private] => [realId:SteamPlayer:private] => [score:SteamPlayer:private] => 1 [state:SteamPlayer:private] => [steamId:SteamPlayer:private] => ) [] => SteamPlayer Object ( [clientPort:SteamPlayer:private] => [connectTime:SteamPlayer:private] => 11.759708404541 [extended:SteamPlayer:private] => [id:SteamPlayer:private] => 0 [ipAddress:SteamPlayer:private] => [loss:SteamPlayer:private] => [name:SteamPlayer:private] => [ping:SteamPlayer:private] => [rate:SteamPlayer:private] => [realId:SteamPlayer:private] => [score:SteamPlayer:private] => 0 [state:SteamPlayer:private] => [steamId:SteamPlayer:private] => ) )
Parse JSON With PHP
Play
DEF CON 22 - Metacortex and Grifter - Touring the Darkside of the Internet. An Introduction to Tor
Play
SMOKEABLES: How to Make a Gravity Bong
Play

Does this look right? I've attached the html if it's difficult to read on the post



Could you also explain how SoureGame is getting all this info? I'm trying to use the normal webapi since it's formatted using JSON since I'm familiar with it.I'm just trying to fetch the playerlist, connect time played per player, and score per player given an IP address.

Thanks, Javier
PHP Test.html

Sebastian Staudt

unread,
Jul 1, 2016, 2:13:17 PM7/1/16
to Steam Condenser
This looks fine, although you might want to reduce the error reporting level (see error_reporting()).

The server information is acquired using a dedicated server protocol. If you want to know the details please have a look at https://developer.valvesoftware.com/wiki/Server_queries or Steam Condenser’s source code).

Javier Salas

unread,
Jul 1, 2016, 4:34:16 PM7/1/16
to Steam Condenser
Do you have any recommendation on how to format/use this data?

Sebastian Staudt

unread,
Jul 2, 2016, 3:14:33 AM7/2/16
to Steam Condenser
I guess this is up to you and heavily depending on your use case. :)

Reply all
Reply to author
Forward
0 new messages