PHP script shows serverinfo with rcon interface for administration

[script version 0.55]


fpsadmin.com FORUM



- own Bad Company 2 server, IP, rcon port (default 48888) and rcon password
- webhosting with PHP 5.0 or higher (the script is not tested on PHP 4.x or lower)
- webhosting with granted access to TCP rcon port of server (default 48888)
- webhosting with granted rights to write logs files (if you turn it on in config file bc2_server_info_config.php)
- basic knowledge of PHP to edit files bc2_server_info_config.php and bc2_server_info_adminlist.php setup your server and add users with their rights
- basic webhosting skills (copy files to web)



- actual and full info about your Bad Company 2 server settings and players (support CONQUEST, RUSH, SQUAD RUSH, SQUAD DEATHMATCH)
- console to sending commands to server
- link to detailed player stats (just click on nick)
- SAY interface for sending "admin.yell" messagess (to all, to team 1/2, to concrete player)
- 3 levels of administration:
    01 ClanUser: only button Kick for kick player from server, good for clanmembers to make a room on server
    05 Admin: some buttons commands, button Switch player + button Kick + button for 1 hour BAN player, say interface (admin.yell), no access to console
    10 God: all buttons, say interface (admin.yell), console
- two log files bc2_server_login.log and bc2_server_cmd.log for monitoring
    Enabling in config file bc2_server_info_config.php, variable $log_enabled = true; (false = disable)
- buttons "K" and "B" for easy KICK (default 10 seconds) / BAN (default 1 hour) player
- button "S" to switch player to the other team
- button "Help" for viewing all admin console commands
- buttons "Set to CW" and "Set to Public" for set server to CW rules and back to Public rules
    CW rules: password ON, killcam OFF, autobalance OFF, 3D spot OFF, friendlyfire ON
    Public rules: opposite to CW rules
    WARNING: since server patch R11, command vars.gamePassword works on unranked servers only!
- button "PB_WebTool", opens new window with this PB tool (Guide)
- button "PB_sv_ver" for viewing PB server version
- button "Set gametype" onnected to listbox with gametypes for changing gametype of next map (also sets default maplist)
- button "mapListAdd" connected to listbox with maps for adding maps to maplist
- button "mapList" for showing current maplist
- button "mapListClear" for clearing maplist
- button "restartLevel" for restarting round
- button "runNextMap" for changing to the next map from your maplist
- button "runNextLevel" for sending map to the next round
- buttons "banlist.list" and "banlist.clear" for viewing banlist and for clearing it



    - folder images with server banner, icons, maps
    - file bc2_server_info.php base script
    - file bc2_server_info_adminlist.php list of users and rights
    - file bc2_server_info_config.php config of server
    - file bc2_server_info_login.php script for login to access to admins part
    - file readme.txt

2. Extract folder bc2php_commander from ZIP file to your disk

3. Edit these two PHP files with some programmer's editor (I'm using this PSPad):
    a) bc2_server_info_config.php for basic server info, IP, rconport, rconpassword, gamepassword
    b) bc2_server_info_adminlist.php for setting users and rights (examples are inside file as notes)

4. [OPTIONAL] Create your own server banner (PNG, 512x64 pixels) and replace the server_banner_512x64.png file with it in folder bc2php_commander/images/bc2/

5. [OPTIONAL] Create a server account on www.gametracker.com and change GSID in file bc2_server_config.php (variable: $gsid)

6. Copy folder bc2php_commander to your web



- Web root is http://www.eas-clan.cz
- Folder bc2php_commander is copied in folder bc2stuff on the web
- Full path to folder bc2php_commander is http://www.eas-clan.cz/bc2stuff/bc2php_commander
- Full path to login script is http://www.eas-clan.cz/bc2stuff/bc2php_commander/bc2_server_info_login.php
- Full path to serverinfo script is http://www.eas-clan.cz/bc2stuff/bc2php_commander/bc2_server_info.php



- 0.55 1.7.2010:
    * added support for SQUAD DEATHMATCH
    * fixed some bugs

- 0.54 27.4.2010:
    * fixed link to player stats (thanx to bArtAA), added variable $playerstatsweb to bc2_server_config.php
    * added new button "Set gametype" for changing gametype (supports all gametypes now)
    * added new button "mapListAdd" for adding map to maplist
    * added new button "mapListClear" for clearing maplist
    * renamed button "restartMap" to "restartLevel" because command admin.restartMap restarts level, not map
    * added new button "runNextMap" for changing to the next map from your maplist
    * added settings for KICK/BAN to file bc2_server_config.php (variables $kick_length,$kick_reason,$ban_length and $ban_reason)

- 0.53 16.4.2010:
    * settings of gametrackers GSID moved to file bc2_server_config.php
    * added button "S" to each player to switch player to the other team
    * added new button "mapList" to show current maplist
    * fixed buttons "Set to RUSH" and "Set to CNQST" (fitted to R9 patch)

- 0.52 5.4.2010:
    * first release


Thanx to author of Python/PHP port: XxMASTERUKxX
Thanx to Mr.Katana for translating my czenglish to english :)