As I made clear before, I plan to gathre statistics for a LANparty. So I've been playing with all the scripts here, added some of Brainpecker's Multi Server Checker scripts. And came up with the following: [link]http://cc8543-a.groni1.gr.home.nl:81/~armeagle/bf2stats1.2ae.zip[/url] Readme: BF2Statistics 1.2ae by ArmEagle (firstname.lastname@example.org) 13-07-2006 ============================================================= Combination of: * www.bf2statistics.com: (Creative Commons) - BF2Statistics (1.2, 19 Feb 15:40) - BF2Statistics Web Interface (Beta, 01 Feb 18:02) - BF2Statistics Signature (1.0, 07 Feb 13:28) * www.brainpecker.com (GNU Generic Public License) - Multi Server Checker (v2.23) - Map pictures for BF1942, BFv, BF2 * Other - I might have used patches for BF2Statistics scripts like an unlocks.py fix. ============================================================= Installation guidelines: Gratz, you succesfully extracted the zipfile! Contents of this zip/folder: * gameserver Altered python files, to replace the existing python and python_xpack directories (make backups! * webserver Three directories, all should be placed in the root of the webserver (if needed, use a virtual one), which is listening to port 80. This can be changed for some, but the ASP directory has to be in root; http://[address]:80/ASP bf2statistics.sql creates the tables and fills the ip2nation table. Installation steps: * DNS - Setup a DNS server and point bf2web.gamespy.com to the webserver's ip-address. * gameserver - Add the DNS server to the top of the list - Backup existing python, python_xpack directories and replace them with the new ones. - In both directories, edit stats/snapshot.py. + Set PREFIX to a simple string similar to the servername. + Set QUERYPORT similar to serversettings.com->sv.gameSpyPort. The webserver needs this port to gather live server info. # note: the servercore will increase this number till it finds a free port. * webserver - Edit /ASP/config.php, /bf2statistics/BF2Stats-config.php to set the right database settings. - Edit /ASP/config.php; $minplayers, to a decent value (1 for testing) - For all free unlocks to online accounts; edit /ASP/config.php set '$allunlocks = 1;' * gameclient - For online accounts to view their progress in BFHQ and select unlocks when available, add the DNS server to the top of the lists on the client machines. ============================================================= Changelog from above versions: * BF2Statistics (Database) - Added a field 'serverid' to the table 'mapinfo', which points to new table 'servers'. Now 'id' and 'serverid' are set to 'PRIMARY'. Thus statistics are stored per map&server. Also added a 'lastupdate' field. - New table 'servers', which stores ip, prefix (from python), server name, gameport, GameSpy queryport and last update field. * BF2Statistics (Web, /ASP) - Prevention of SQL injection - prefix is used in the table now; will name a server till next GameSpy query by Brainpecker's Multi Server Check, queryport is stored so that live server information can be gathered using hte GameSpy protocol. - getPID.php added. This script will return the PlayerID of an existing entry in 'player'. Or create a new one. This replaces Chumps use of pid.txt and allows for multiple servers creating offline accounts / bot entries, whithout causing collisions or duplicate entries. * BF2Statistics (Web Interface, /bf2statistics) - Rearranged content of header, footer and 'center' scripts a bit. - Header script now includes CSS file for Multi Server Checker. and has a line of inter-site links. Removed the top image. - Added small private rank image for leaderboard. - Added 'servers.php' which shows a leaderboard of servers. Since 'mapinfo' is now stored per server&map it can show map info for a server. Brainpecker's Multi Server Checker is included to show detailed live server stats, using the GameSpy protocol, if the server is online. - Changed (Google) Firefox banner. * BF2Statistics (gameserver python script) * PlayerManager.py - Replaced Chump's offline account/bot support based on pid.txt with a central database backend. PIDs for these cases will start at 999998 and decreasing. When the python scripts can't connect to the central webserver, the PID 999999 is used instead. * stats/snapshot.py - Now also sends the GameSpy queryport in getSnapShot(), and the prefix is intended to be used as a simple server identifier. * stats/unlocks.py - onPlayerConnect() would crash my linux server when an offline account connected. Added some extra code to prevent that. * Multi Server Checker, Map pictures: - Included some of the files into bf2statistics. So this can be included inline in servers.php - Took the 'pics' directory - Renamed css.css to serverChecker.css, now included in the header.php. Redundant entries were removed. - And further all serverChecker*.php scripts needed for the active server overview - For compatibility and layout some things were disabled by config, other things were taken out of the code directly. - Ip and port are defined in servers.php before these scripts are included. - link in front of playernicks now point to player.php - Stores server detail in the 'servers' table entry * BF2Statistics Signature: - Added a very simple theme myself, all dirs are symlinks to the default theme, actually only the normal.png is a different image. ============================================================= TODO: + Get this nicely wrapped into about.php + Links to signatures should be added to the player info page. + For LAN, player should be able to change countrycode. + Central main configuration (database) for all webscripts. - Brainpecker's Multi Server Check should be converted to a single class. So that the encapsulating php script can simply call functions. - The python code should either read the server config, or an easier located config file, or get the settings from within the engine.