news
projects
downloads
links
forum



Battlefield 2 Stats Query

The BF2 Stats Query shows all the game-statistics, which you usually have to view ingame in the BFHQ, in your webbrowser. The focus of this script is to compare two players' stats, which the ingame BFHQ only supports rudimentary. The BF2 Stats Query can show the stats of two players side by side and highlight the "better" value.

This script supports MySQL database caching, so stats don't have to be queried from the BF2 stats-servers each time. This will minimize traffic for the webserver as well as load for the stats-servers, and make the page load much faster (for cached results).

Type: PHP server application

Requirements: webserver with PHP 4 and MySQL

Download: downloads page

Latest version: v2.12 (May 13th, 2006)

Online Demo:

Enter your Battlefield 2 nickname or pid here:

Show Battlefield 2 Stats
Nick or PID 1
Nick or PID 2 (optional)
search local database (use * as wildcard)
show as list
Last 10 Views
#nickscore
1Tor77777765112
2mrboss007170479
3MaynardHicks10182
4omiyaardija_jp96988
5PokeYouintheEye8435
6Pyzro42492
7**MisterBlair**477325
8Oberst69251131
9lazoras3114471
10Sally-Willy117359
EA Top 10
#nickscore
1Snofru78803203
2=OSS*ROID=770528
3t-bon4020763830
4heniek428749548
5Amoook736936
6Gibster401736045
7Predator01500735320
8juwery007733264
9Cor1e0ne731314
10-=ACU=-Angel731023
Local Top 10
#nickscore
1StewenGarfield90700116
2-=RD=-Volx661601
3AG--Postman{Bonz}-->463732
4tactical76453965
5stryko3386247
6EDC-Jimix358591
7ZorboGLotz330596
8Artic_Viking269374
9lackdoktor267388
10dark_winged_angel261348


Installation:
  • unzip the content of the zip-archive to a temporary folder on your computer
  • open "bf2_stats_config.php" with a Texteditor (e.g. Notepad) and edit the config settings. You have to enter your database settings !!
  • upload all the files to your web space (empty sub-folder recommended), keeping the folder structure
  • open the file "bf2_stats_createMySqlTable.php" in your webbrowser. If it says "Table successfully created", you are ready to go.
  • optionally download and unzip the pictures from the "BF2 Stats Query Picturepack" on the downloads page) to the "pics/" folder, and upload it, too.
  • to run the script, open "index.php" in your webbrowser. You should see a box to enter you nick or pid, like above under "Online Demo".

Upgrade from v1.12:

  • upload all files and all new images
  • run "bf2_stats_createMySqlTable.php" to upgrade the database
  • enter database info and adjust your settings in "bf2_stats_config.php"

Upgrade from v2.11:

  • upload the changed files: bf2_stats_db_maps.db, bf2_stats_main.php, bf2_stats_award_descr.htm, bf2_stats_tables.php

Attention:

Changes on the BF2 stats servers might prevent this script from working correctly in the future !

Changelog:

  • BF2 Stats Query v2.12:
    - added Armored Fury booster pack maps to map database
    - updated award descriptions (file updated by Aclure and Mortal76)
    - fixed issue where kit stats showed ratio instead of real numbers

    changed files: bf2_stats_db_maps.db, bf2_stats_main.php, bf2_stats_award_descr.htm, bf2_stats_tables.php

  • BF2 Stats Query v2.11:
    - fixed popups not being displayed correctly in a few cases
    - fixed "Call-time pass-by-reference" warning displayed in a few cases
    - fixed font-size problem for badges in Opera browser

    changed files: bf2_stats_award_req.php, bf2_stats_main.php, bf2_stats_more_functions.php

  • BF2 Stats Query v2.1:
    - added popup with requirements for each award
    - changed "$conf_hide_grey_awards" also affects unlock-images now
    - fixed maps "Great Wall" and "Taraba Quarry" were exchanged (thx to AIDS_2000)
    - fixed issue where script took nicks starting with a number as pid (thx to Ph0sph0ruz)
    - fixed army stats for Euro were missing
    - fixed Euro Forces Service Ribbon was missing

    changed files: bf2_stats_class.php, bf2_stats_config.php, bf2_stats_db_awards.db, bf2_stats_db_maps.db, bf2_stats_db_namings.db, bf2_stats_main.php, bf2_stats_medals.php, bf2_stats_tables.php, bf2_stats_unlocks.php,

    new files: bf2_stats_award_descr.htm, bf2_stats_award_req.php

  • BF2 Stats Query v2.01:
    - fixed times on new maps were shown as timestamp rather than as human-readable times

    changed files: bf2_stats_class

  • BF2 Stats Query v2.0:
    - added support for the Euro Forces booster pack
    - added display and further support of unlocks
    - added display of not yet won awards in grey
    - changed the display of medals; seperated by badges, medals and ribbons now
    - added options to customize award layout
    - added big display of gold, silver and bronze medals
    - improved design
    - added easy option to adjust script to new BF2 extensions (maps, unlocks and awards can easily be added by editing one file now)
    - more small fixes and improvements

    changed files: all includeing css stylesheet !

  • BF2 Stats Query v1.12 beta:
    - added new ranks which came with the BF2 patch v1.2
    - added PHP error reporting for webservers which had it turned off
    - fixed picture path setting now also works for awards
    - fixed small bug in toplists, where the link in the EA top 10 was wrong in some cases

    changed files: bf2_stats_class, bf2_stats_main.php, bf2_stats_tables.php and bf2_stats_toplists.php

  • BF2 Stats Query v1.11 beta:
    - optimized ability to embed script in other page
    - added config option for path to the embedding page
    you don't need to update from v1.1 to v1.11 if you don't want to embed it in another page

    changed files:
    bf2_stats_config.php, bf2_stats_main.php, bf2_stats_tables.php and bf_stats_toplists.php

  • BF2 Stats Query v1.1 beta:
    - fixed database purge function (didn't work before)
    - fixed/added support for players not on the leaderboard (0 score)
    - fixed display of rank 12 (2nd Lieutenant)
    - fixed issue that error message cut off footer of the page
    - changed design/layout
    - added "Progress to next rank" bar
    - added search function for EA servers (shows additional similar results in a box)
    - added advanced search function for local database (with wildcards)
    - added several "toplists" (EA top 10, local top 10, last 10 viewed)
    - added buddylist (add buddies by clan-tag, pid or nick)
    - added alternative query method, that doesn't require "ini_set()" (which might not be allowed on some webspaces, and so blocks the script from working)
    - added config option to change awards-pictures size
    - added config option to only show the highest badge of basic/veteran/expert-badges
    - and many more smaller changes ...

    changed files: bf2_stats_class.php, bf2_stats_config.php, bf2_stats_layout.php, bf2_stats_listview.php, bf2_stats_main.php, bf2_stats_medals.php, bf2_stats_more_functions.php, bf2_stats_tables.php and bf_stats_toplists.php

  • BF2 Stats Query v1.02 beta:
    - optimized database security and access

  • BF2 Stats Query v1.01 beta:
    - small hotfix

  • BF2 Stats Query v1.0 beta:
    - first public release

License:

3rd party parts:

Bugs or Problems: