I just put together a script to output your ranked Battlefield 2 stats, just pass your nick to the function (note: apparently some nicks don't work depending on character usage). Bear in mind i threw it together in 5 mins this morning, so while criticism is welcome don't flame.
Question
Kudos Veteran
I just put together a script to output your ranked Battlefield 2 stats, just pass your nick to the function (note: apparently some nicks don't work depending on character usage). Bear in mind i threw it together in 5 mins this morning, so while criticism is welcome don't flame.
function misc_bf2($nick) { $rank = array( "0" => "Private", "1" => "Private First Class", "2" => "Lance Corporal", "3" => "Corporal", "4" => "Sergeant", "5" => "Staff Sergeant", "6" => "Gunnery Sergeant", "7" => "Master Sergeant", "8" => "First Sergeant", "9" => "Master Gunnery Sergeant", "10" => "Sergeant Major", "11" => "Sergeant Major of the Corps", ); $url = "http://bf2web.gamespy.com/ASP/getplayerinfo.aspx?nick=".urlencode($nick)."&info=rank,scor,kill,dethfile($url); $stats = explode("\t", $raw[4]); echo "Nick: ".$nick."<br />"; echo "Rank: ".$rank[$stats[3]]."<br />"; echo "Score: ".$stats[4]."<br />"; echo "Kills: ".$stats[5]."<br />"; echo "Deaths: ".$stats[6]; }
If you decide to use it, post where you've used it here :)
/k
Link to comment
https://www.neowin.net/forum/topic/343217-php-bf2-stat-script/Share on other sites
7 answers to this question
Recommended Posts