In: , , ,
On: 2005 / 01 / 22
Shorter URL for this post: http://ozh.in/42

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

Metastuff

This entry "Quake3 WebRCON : Web Based RCON Interface" was posted on 22/01/2005 at 3:52 pm and is tagged with , , ,
Watch this discussion : Comments RSS 2.0.

31 Blablas

  1. BOK says:

    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.

  2. Ozh says:

    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 :)

  3. BOK says:

    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.

  4. BOK says:

    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!

  5. Ozh says:

    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 …

  6. BOK says:

    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…

  7. Ozh says:

    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 …

  8. Hein says:

    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 .

  9. Ozh says:

    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.

  10. Hein says:

    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 :)

  11. Yuras says:

    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.

  12. Pyro says:

    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 ;)

  13. Ozh says:

    Thank you for your feedback :)

  14. ReD says:

    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?

  15. Ozh says:

    No.
    :)
    (don't know CoD)

  16. me says:

    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 :)

  17. me says:

    i forgot to say, good work !! is there a way to chat over msn/aim/icq? :)

  18. Ozh says:

    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 :Þ

  19. me says:

    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

  20. me says:

    maybe you can improve it?

  21. Ozh says:

    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.

  22. me says:

    yeah, i forgot about the that ;/

    cya man.

  23. da faust says:

    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?

  24. da faust says:

    it is on cod ou sry for got to mention

  25. da faust says:

    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

  26. Erik Corona says:

    Need register globals on.

  27. Zex_Suik says:

    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.

  28. methejuggler says:

    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;
    }

  29. Paul says:

    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.

  30. Stefan1200 says:

    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

  31. espionage says:

    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

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>
Gravatars: Curious about the little images next to each commenter's name ? Go to Gravatar and sign for a free account
Spam: Various spam plugins may be activated. I'll put pins in a Voodoo doll if you spam me.

Read more ?