Valve RCON: Manage remote game servers via RCON protocol

Recommend this page to a friend!
  Info   View files (15)   Download .zip   Reputation   Support forum (1)   Blog    
Ratings Unique User Downloads Download Rankings
65%Total: 985 All time: 3,639 This week: 398
Version License PHP version Categories
valve_rcon 1.0GNU General Publi...5.0Networking, PHP 5, Games
Description Author

This class can be used to manage game servers using a remote console via TCP and UDP.

It can establish a TCP or UDP connection to a game server that supports the Source RCON protocol and authenticate as an authorized user.

The class can send commands to the remote servers to control the games.

This is an updated version of the original class by the same author to use PHP 5 features and also support UDP connections.

Picture of Shannon Wynter
Name: Shannon Wynter is available for providing paid consulting. Contact Shannon Wynter .
Classes: 9 packages by
Country: Australia Australia
Age: 38
All time rank: 1232 in Australia Australia
Week rank: 713 9 in Australia Australia
Innovation award
Innovation award
Nominee: 3x

Valve RCON Class.

Version 1.0

Author: Shannon Wynter (
			Copyright (C) Shannon Wynter &

License: GPL 2.0 or greater

The php5 version of my original RCON class for making use of the remote console
facilities on various game servers.

Basic Synapsis:
There are two ways to use this class, one is the more traditional lazy method as
implemented by other functions/classes availible on the net, the other is a stricter
method that requires you to do your own connecting and authenticating.

There is a performance penalty for using the traditional method over multiple
commands in that it has to connect, and authenticate every single time.

So my general advice, use the general usage method as described below if you have
to execute more then a couple of commands

** General Usage:
$r = new Valve_RCON('secret', '', 27015, Valve_RCON::PROTO_SOURCE);
print $r->execute('status');
print $r->execute('kick user');

** Traditional Lazy Usage:
$r = new Valve_RCON('secret', '', 27015, Valve_RCON::PROTO_SOURCE);
print $r->execute('status');

Full Documentation:

You can generate full documentation by making sure you have
phpDocumentor installed and running the file found in
this directory


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

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <>.
File Role Description
doc (7 files, 2 directories)
example (1 file) Data Documentation Generator
README Doc. Readme file
valve_rcon.php Class The Valve_RCON class

  Files  /  doc  
File Role Description
Fremnet (1 directory)
media (2 files)
   blank.html Doc. Documentation
   classtrees_Fremnet.html Doc. Documentation
   elementindex.html Doc. Documentation
   elementindex_Fremnet.html Doc. Documentation
   index.html Doc. Main Documentation Index
   li_Fremnet.html Doc. Documentation
   packages.html Doc. Documentation

  Files  /  doc  /  Fremnet  
File Role Description
Valve_RCON (2 files)

  Files  /  doc  /  Fremnet  /  Valve_RCON  
File Role Description
   Valve_RCON.html Doc. Documentation
   _valve_rcon.php.html Doc. Documentation

  Files  /  doc  /  media  
File Role Description
   banner.css Data CSS for Documentation
   stylesheet.css Data CSS for Documentation

  Files  /  example  
File Role Description
   example.php Example A complete example for both Classic and Source

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:3,639
This week:398
User Ratings User Comments (1)
 All time
Works Great!
9 years ago (Andrei M)

For more information send a message to info at phpclasses dot org.