I wrote a PHP interface to send remote console (rcon) commands to a Quake3 server. It has about all the features a server admin should need, all packed in a compact interface. Read more for a detailed list of features, or see the demo.
Features
- Manage conveniently several servers
- Define a set a custom configs for each server (e.g. "ctf.cfg", "tdm.cfg", …)
- Easily add your own rcon command buttons
- One Click Nick Kick © ® ™ :-P
- One click IP banning
- Sortable player data (optional, MSIE only, click on "Score" in the demo to see)
- .css layout so you can easily integrate the page in an existing site with your colors, look & feel
Download
Get the script, edit the beginning to suit your needs, and upload it on your web server.
- webrcon.txt (right click & save as webrcon.php)
- webrcon.php (colorized html, copy & paste into a blank file but don't download it : it's colorized html, not code :)
Shorter URL
Want to share or tweet this post? Please use this short URL: http://ozh.in/42
C'est fantastique! Merci beaucoup for all your scripts!
Does it work with Enemy Territory too?
Goot find out when I get home.
PS Very nice site, gotta bookmark this.
Thanks for your comment.
As for ET, it would be easy to make it work. The networking code is the same, so it's probably a matter of changing a few lines in the code where connection is set up (port number etc)
Can't test it tho, I'm a pure Quaker :)
I used to play a lot of Quakeworld and esp. Q3A. I even played in am international clan: [OAP] URL: http://www.oap-clan.de/ :mrgreen:
These days I hardly play Quake, I prefer ET.
This scripts makes me hungry to set up a server again.
I can't get it to work on a quickly installed Q3A-server…
I've changed the $_PHP['SELF'] to the file itself, even though phpinfo shows SELD.
And what's the value for "rcon" in the script? Is it needed explicitly?
Merci!
Well, give more details on "I can't get it to work" if you want me to be of any help …
Of course you need to explicitly specify values for rcon, ip, port and stuffs …
More details, but should I do that here? Well okay. :)
I get the webrcon page and I can select a server. As I click on mine a get a page-refresh back to where I started. I got PHP-error logging active in Apache, but no error shows up.
Also as far as I know only three parameters are needed for an rcon: IP, port and rconpassword. In your script there is an optional "cfg" and "rcon". I'm confused about this last one…
As for the "cfg" : you can specify custom config files for your server, just like /rcon exec ctf.cfg in the console.
As it says in the source :
* Custom .cfg for each servers can be a list (array of cfg), a single cfg, or nothing
.As for the strange behaviour, don't know, had no problem with this script on 3 different web servers, must be something weird with yours …
is this script working with ra3 ? (mod in q3)
if so , i cant get the player data to work .
btw this is very nice made :) good job .
I'm only using it with OSP and own nor admin no RA3 server, but it's not supposed to be mod dependant.
Of course, RA3 being the crap code it is known to be, I cannot guarantee they didn't modify the core code and network code related to server queries.
i also tried to do this on my own q3 server but i cant get the rcon to work .
im not getting stats from players and i cant see the players on the website .
i cant exec rcon commands .
the webrcon website is listed above , your welcome to try it :)
I think there is some problem with the query.. UDP sockets will sometimes appear to have opened without an error, even if the remote host is unreachable. The error will only become apparent when you read or write data to/from the socket. The reason for this is because UDP is a "connectionless" protocol, which means that the operating system does not try to establish a link for the socket until it actually needs to send or receive data.
And the webrcon works perfectly for Call of Duty too, just entered the server info, and changed the commands of the buttons.
Player data, rcon, server info… all OK :)
Thanks for this script, it's a easier way then giving everyone in the clan the rcon password.
Well done ;)
Thank you for your feedback :)
hmm… i can not connect to my cod-server. ip, port and rcon-pw is correct. i see the server in the drop-down-menue, but, if i press SELECT, nothing happens… any idea?
No.
:)
(don't know CoD)
hum, your code is nice, new design is needed for sure. Why keep the rcon password in that file? you can use a mysql database to store the rcon password encrypted and you can offer a login before using rcon and also after login in you should type the rcon password to send the commands, just like punkbuster webtool :P
I am working on adding a login system and a new design and all of the above for my site :)
i forgot to say, good work !! is there a way to chat over msn/aim/icq? :)
I wrote this script for personal use, no special login features where needed. And no, there's no way to contact me on MSN, AIM or ICQ :) On IRC maybe, if you can find me :Þ
k :)
was just some suggestions, for everyone to use, i am admin and there's no way i will provide this tool to the other admins without any protection :)
i wont be able to find YOU on the internet hehe
maybe you can improve it?
Sorry, I won't. It suited my needs like this. If you really need some login security, just put the script in a .htpasswd protected directory.
yeah, i forgot about the that ;/
cya man.
i cant get any commands to work like the cow thaing or mortor stuff like that can u help, wut would i need to be able to control them?
it is on cod ou sry for got to mention
damn i keep forgeting to say stuff, when i try to do the commands it says unknown command how do i get it to work?, on cod ou, i have the rcon and every thaing just wont work
Need register globals on.
Hello. Seems very promising but I am having some troubles.
1st. It loads fine but when I selet a server from the initial drop down list and click go, nothing happens. It just sits there. WHat am I missing?
Also where do the cfg files go? Are these just the ones in the quake or mod folder? Or do these go in the same directory as the script on the server?
Thanks for the help in advance.
I know this is an old post, but since people were having issues, I thought I'd help out….
The reason the script isn't working for many people is because the script writer is assuming that the "register_globals" directive is set in php….
As a workaround for this, you can add the following code to the top of the script:
foreach($_REQUEST as $key => $val)
{
${$key} = $val;
}
What methejuggler suggest will work, or in one line:
http://ca3.php.net/manual/en/function.import-request-variables.php
Just throw that in at the top.
I created a register globals off version (without any workaround).
If Ozh want, he can publish it as second download link. I made no other changes to the code.
DL: http://server.german-fighters.com/mupload/17/webrcon.txt
Hey guys,
I wrote another q3 Ufreeze admin web app, thats pretty slick, might consider this also: http://www.empire-clan.net/q3manager.tar.gz
I used the webrcon script here.. but desided that it didn't have some of the options I wanted. This script queries the server and runs a command called dumpstats which generates a xml file in your /root/.q3a/stats/here.xml then the php program i wrote parses the xml file and gives a pretty cool display. check it out – send me an email if you like it j.loveles at gmail doot com