Austinb / GameQ

A PHP Gameserver Status Query Library
https://austinb.github.io/GameQ/
GNU Lesser General Public License v3.0
403 stars 137 forks source link

Will support for STALKER multiplayer #23

Closed AmkCity closed 12 years ago

AmkCity commented 12 years ago

Will support for STALKER multiplayer

AmkCity commented 12 years ago

Fatal error: Uncaught exception 'GameQException' with message 'length OOB' in _*\gameq\buffer.php:106 Stack trace: #0 \gameq\buffer.php(282): GameQ_Buffer->read(2) #1 __\gameq\protocols\gamespy3.php(131): GameQ_Buffer->readInt16() #2 \gameq\protocols\gamespy3.php(203): GameQ_Protocols_Gamespy3->preProcess_all(Array) #3 [internal function]: GameQ_Protocols_Gamespy3->process_all() #4 __\gameq\protocols\core.php(546): call_user_func_array(Array, Array) #5 \GameQ.php(454): GameQ_Protocols_Core->processResponse() #6 *\GameQ.php(436): GameQ->filterResponse(Object(GameQ_ProtocolsStalker)) #7 **\stat_cron.php(51): GameQ->requestData() #8 {main} thrown in

AmkCity commented 12 years ago

Some sites give good info, and some lead to a fatal error. Problem Server: 83.234.147.23:4556

Austinb commented 12 years ago

Generally this means that the server is not listening or did not respond on that port. I believe in GS3 you can change the port you use for querying in the server's config. If the owner of the server changes this port it will be hard to guess it.

To hide the thrown exceptions use ->debug = FALSE and it will just return the server information as not online (and empty) this way your script will not break if you are querying multiple servers at once.

If you have any other problems please open a new issue. Thanks.

AmkCity commented 12 years ago

fatal error in this script http://amursk-portal.ru/game_stats/ $servers = array( array( 'id' => 'stalker', 'type' => 'stalker', 'host' => '83.234.147.23:5445' ), );

"To hide the thrown exceptions use ->debug = FALSE" - where it is used?

Austinb commented 12 years ago

When you instance the class. You can set options like time out. So:

$gq = new GameQ();
$gq->setOption('timeout', 5)
    ->setOption('debug', TRUE)
    ->setFilter('normalise')
    ->addServers($servers);

$results = $gq->requestData();