• Stars
    star
    577
  • Rank 77,363 (Top 2 %)
  • Language
    PHP
  • License
    GNU Lesser Genera...
  • Created over 12 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

🐘 PHP library to query servers that implement Steam query protocol (also known as Source Engine Query protocol)

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.

⚠️ 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
10 Counter-Strike 1.6
440 Team Fortress 2
550 Left 4 Dead 2
730 Counter-Strike: Global Offensive host_name_store 1; host_info_show 2; host_players_show 2
1002 Rag Doll Kung Fu
2400 The Ship
4000 Garry's Mod
17710 Nuclear Dawn
70000 Dino D-Day
107410 Arma 3 Add +1 to the server port
115300 Call of Duty: Modern Warfare 3
162107 DeadPoly
211820 Starbound Call SetUseOldGetChallengeMethod method after connecting
244850 Space Engineers Add +1 to the server port
304930 Unturned Add +1 to the server port
251570 7 Days to Die
252490 Rust
282440 Quake Live Quake Live uses the ZMQ messaging queue protocol for rcon control.
346110 ARK: Survival Evolved
~ Minecraft
108600 Project: Zomboid

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

More Repositories

1

PHP-Minecraft-Query

🐘 PHP library to query Minecraft servers
PHP
727
star
2

CS2

🔫 Counter-Strike 2 stuff
148
star
3

SteamID.php

🆔 PHP library to work with SteamIDs
PHP
142
star
4

SteamWebAPIDocumentation

📃 An automatically generated list of Steam Web API interfaces, methods and parameters. Allows you to craft requests in the browser.
Vue
138
star
5

SteamWebPipes

🚀 Pushes Steam changelists to WebSocket clients
C#
120
star
6

mcstatus

💡 Minecraft services status checker
PHP
112
star
7

AMXX-Plugins

💌 Most of my AMXX plugins that I've ever written
Pawn
73
star
8

DomainNameSearch

🔥 Lookup domain names against all extensions
HTML
70
star
9

FlatMumble

💬 Flat and unified mumble theme (MUMBLE 1.3.0 SHIPS WITH MODIFIED VERSION OF THIS THEME)
40
star
10

HTTPsys

🔥 A checker site for MS15-034 / CVE-2015-1635
PHP
38
star
11

SteamOpenID.php

🐘 A correct and simple implementation of OpenID authentication for Steam
PHP
37
star
12

Steam-Card-Farmer

🃏 Idle your Steam games to get trading cards
JavaScript
37
star
13

GitHub-WebHook

🐱 Validates and processes GitHub's webhooks
PHP
30
star
14

SteamLicenseParser

📦 Parsers your Steam licenses and generates some stats
HTML
29
star
15

Crimp.php

⚡ A simple multi curl implementation, optimized for high concurrency.
PHP
25
star
16

Re-Crono-HexChat

🕶 A dark GTK theme for HexChat
25
star
17

adventofcode-solutions

🎄 My solutions to https://adventofcode.com/
C#
24
star
18

smtp-forwarder

Simple SMTP message to HTTP forwarder
JavaScript
15
star
19

SteamDepotFileVerifier

Find unknown files in Steam game folders by comparing against depotcache manifests
C#
15
star
20

FreeWarden

🔎 Monitor whois, certificate, and dns changes
PHP
13
star
21

AMXX-Gag

🔇 This plugin allows you to gag players from using say_team, say or voicecomm
SourcePawn
13
star
22

DumpStrings

macho-strings will programmatically read an Mach-O binary's string sections within a given binary. This is meant to be much like the strings UNIX utility, however is purpose built for Mach-O binaries.
Go
11
star
23

EntityLumpDumper

Dump entity lump from BSP maps (CS:GO, TF2, etc..)
C#
9
star
24

WendySharp

👮 Wendy# — A C# IRC bot
C#
8
star
25

MumblePing

🎙 A simple function to execute UDP Ping on Mumble servers
PHP
8
star
26

TwitterToWebhook

🐦 Stream tweets to a webhook url
C#
7
star
27

CompareArrays.php

🍌 Diffing multi dimensional arrays the easy way
PHP
7
star
28

xpaw.me

🐾 My personal website
HTML
6
star
29

znc-prioritysend

⏫ Allows certain messages to be placed in front of the send queue
C++
6
star
30

OpenplanetDriveAlone

👆 A Trackmania 2020 plugin to automatically click "Drive Alone" when loading a map in Solo to avoid selecting a ghost to race against.
AngelScript
6
star
31

urlshortener

🔗 A simple url shortener.
PHP
5
star
32

xPaw

4
star
33

php-vue-template

HTML-based template for PHP syntax inspired by Vue.
PHP
3
star
34

PHP-StarMade-Query

🐘 PHP library to query StarMade servers
PHP
3
star
35

BombGame

💣 A game mode for CS:GO
SourcePawn
3
star
36

steam-tags-game

🎲 This is our defunct mini game
HTML
2
star
37

AMXX-Language-Analyzer

🈂️ Analyze AMXX translation files for missing and erroneous translations
PHP
2
star
38

Bugsnuggle

🐛 A crappy local clone of Bugsnag
PHP
2
star
39

PHP-TUG-Query

🐘 PHP library to query TUG servers
PHP
1
star
40

test-secrets

1
star
41

.github

😾 Default community health files
1
star