define( 'SQ_SERVER_ADDR', 'localhost' ); define( 'SQ_SERVER_PORT', 27015 ); define( 'SQ_TIMEOUT', 1 ); define( 'SQ_ENGINE', SourceQuery :: SOURCE ); // Edit this <- $Query = new SourceQuery( ); try { $Query->Connect( SQ_SERVER_ADDR, SQ_SERVER_PORT, SQ_TIMEOUT, SQ_ENGINE ); $Query->SetRconPassword( 'my_awesome_password' ); var_dump( $Query->Rcon( 'say hello' ) ); } catch( Exception $e ) { echo $e->getMessage( ); } $Query->Disconnect( );