define( 'SQ_SERVER_ADDR', 'localhost' ); define( 'SQ_SERVER_PORT', 27015 ); define( 'SQ_TIMEOUT', 1 ); define( 'SQ_ENGINE', SourceQuery :: SOURCE ); // Edit this <- $Timer = MicroTime( true ); $Query = new SourceQuery( ); $Info = Array( ); $Rules = Array( ); $Players = Array( ); try { $Query->Connect( SQ_SERVER_ADDR, SQ_SERVER_PORT, SQ_TIMEOUT, SQ_ENGINE ); $Info = $Query->GetInfo( ); $Players = $Query->GetPlayers( ); $Rules = $Query->GetRules( ); } catch( Exception $e ) { $Exception = $e; } $Query->Disconnect( ); $Timer = Number_Format( MicroTime( true ) - $Timer, 4, '.', '' ); ?> Source Query PHP Class

Source Query PHP Class

This class was created to query game server which use the Source (Steamworks) query protocol.

Made by xPaw View on GitHub CC BY-NC-SA 3.0

at line getLine( ); ?>

getMessage( ) ); ?>

getTraceAsString(), false ); ?>

$InfoValue ): ?>
Server Info (queried in s)
"; print_r( $InfoValue ); echo ""; } else { echo htmlspecialchars( $InfoValue ); } ?>
No information received
Player Frags Time
No players in da house
$Value ): ?>
Rules