Download the PHP package xpaw/php-source-query-class without Composer

On this page you can find all versions of the php package xpaw/php-source-query-class. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package php-source-query-class

PHP Source Query

Packagist Downloads Packagist Version

This class was created to query game server which use the Source query protocol, this includes all source games, and all the games that implement Steamworks.

The class also allows you to query servers using RCON although this only works for half-life 1 and source engine games.

Minecraft also uses Source RCON protocol, and this means you can use this class to send commands to your minecraft server while having engine set to Source engine.

:warning: Do not send me emails if this does not work for you, I will not help you.

Requirements

Protocol Specifications

Supported Games

AppID Game Query RCON Notes
~ All HL1/HL2 games and mods :white_check_mark: :white_check_mark:
10 Counter-Strike 1.6 :white_check_mark: :white_check_mark:
440 Team Fortress 2 :white_check_mark: :white_check_mark:
550 Left 4 Dead 2 :white_check_mark: :white_check_mark:
730 Counter-Strike 2 :white_check_mark: :white_check_mark: host_name_store 1; host_info_show 2; host_players_show 2
1002 Rag Doll Kung Fu :white_check_mark: :white_check_mark:
2400 The Ship :white_check_mark: :white_check_mark:
4000 Garry's Mod :white_check_mark: :white_check_mark:
17710 Nuclear Dawn :white_check_mark: :white_check_mark:
70000 Dino D-Day :white_check_mark: :white_check_mark:
107410 Arma 3 :white_check_mark: :x: Add +1 to the server port
115300 Call of Duty: Modern Warfare 3 :white_check_mark: :white_check_mark:
162107 DeadPoly :white_check_mark: :x:
211820 Starbound :white_check_mark: :white_check_mark: Call SetUseOldGetChallengeMethod method after connecting
244850 Space Engineers :white_check_mark: :x: Add +1 to the server port
304930 Unturned :white_check_mark: :x: Add +1 to the server port
251570 7 Days to Die :white_check_mark: :x:
252490 Rust :white_check_mark: :x:
282440 Quake Live :white_check_mark: :x: Quake Live uses the ZMQ messaging queue protocol for rcon control.
346110 ARK: Survival Evolved :white_check_mark: :white_check_mark:
~ Minecraft :x: :white_check_mark:
108600 Project: Zomboid :white_check_mark: :white_check_mark:

Open a pull request if you know another game which supports Source Query and/or RCON protocols.

How to tell if the game supports Source Query Protocol?

Add your server to your favourites in Steam server browser, and if Steam can display information about your server, then the protocol is supported.

Functions

Connect( $Ip, $Port, $Timeout, $Engine ) Opens connection to a server
Disconnect( ) Closes all open connections
Ping( ) Ping the server to see if it exists
Warning: Source engine may not answer to this
GetInfo( ) Returns server info in an array
GetPlayers( ) Returns players on the server in an array
GetRules( ) Returns public rules (cvars) in an array
SetRconPassword( $Password ) Sets rcon password for later use with Rcon()
Rcon( $Command ) Execute rcon command on the server

Also refer to examples folder to work things out.

License

PHP Source Query
Copyright (C) 2012-2015 Pavel Djundik

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA

All versions of php-source-query-class with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package xpaw/php-source-query-class contains the following files

Loading the files please wait ....