wolfcry044 Posted October 13, 2007 Share Posted October 13, 2007 I need help building a PHP High Scores system. I've looked all over the net and the only ones I can find are for flash based high scores system. I need to build one for Battlefield 2142 stats so that I can list my clan members on a chart showing peoples scores on each stat and listing them in order of best score to lowest. Could anyone show me how to go about doing this? Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/73080-php-high-scores-system/ Share on other sites More sharing options...
jd2007 Posted October 13, 2007 Share Posted October 13, 2007 hey, i have a high scores class ? if u want, pm me. Quote Link to comment https://forums.phpfreaks.com/topic/73080-php-high-scores-system/#findComment-368552 Share on other sites More sharing options...
MasterACE14 Posted October 13, 2007 Share Posted October 13, 2007 I believe their is a Battlefield 2142 player stats website, where you may be able to get your clans information through XML in PHP. Not 100% sure, but its worth looking into. Regards ACE Quote Link to comment https://forums.phpfreaks.com/topic/73080-php-high-scores-system/#findComment-368554 Share on other sites More sharing options...
GamingWarrior Posted October 13, 2007 Share Posted October 13, 2007 http://bf2142tracker.com/livefeed/xml_clanprofile.php?clanid=1234 I think thats what ACE is talking About Also if you need any help with how to read data from that xml page let me know, i have spent the last week doing a lot of it Quote Link to comment https://forums.phpfreaks.com/topic/73080-php-high-scores-system/#findComment-368583 Share on other sites More sharing options...
wolfcry044 Posted October 13, 2007 Author Share Posted October 13, 2007 Definately going to need help lol Thanks guys. Quote Link to comment https://forums.phpfreaks.com/topic/73080-php-high-scores-system/#findComment-368585 Share on other sites More sharing options...
GamingWarrior Posted October 13, 2007 Share Posted October 13, 2007 Here is a little head start for you. <?PHP $clanid = "2140"; $xml = simplexml_load_file('http://bf2142tracker.com/livefeed/xml_clanprofile.php?clanid=' . $clanid); echo' <table border="1"> <tr> <th colspan="8" scope="col">Battle Feild 2142 Clan Stats</th> </tr> <tr> <td><div align="center">#</div></td> <td><div align="center">Playename</div></td> <td><div align="center">Country</div></td> <td><div align="center">Wins</div></td> <td><div align="center">Losses</div></td> <td><div align="center">Kills</div></td> <td><div align="center">Deaths</div></td> <td><div align="center">Status</div></td> </tr>'; foreach ($xml->PLAYERLIST->PLAYER as $Player) { $rank = $Player->PLAYERRANK; $name = $Player->PLAYERNAME; $profile = $Player->PLAYERSTATSURL; $flag = $Player->PLAYERCOUNTRY; $wins = $Player->PLAYERWINS; $loss = $Player->PLAYERLOSS; $kills = $Player->PLAYERKILLS; $deaths = $Player->PLAYERDEATHS; $status1 = $Player->PLAYERSTATUS; if ($status1 == 1) { $status = online; }else{ $status = offline; } if ($flag == "-") { $flag = "unknown"; } echo' <tr> <td><img src="http://bf2142tracker.com/Images/bf2142_rankimages/ranksmall_' . $rank . '.gif"></td> <td><a href="' . $profile . '" target="_blank">' . $name . '</a></td> <td><img src="http://bf2142tracker.com/Images/CountryIcons/' . $flag . '.gif"></td> <td>' . $wins . '</td> <td>' . $loss . '</td> <td>' . $kills . '</td> <td>' . $deaths . '</td> <td><img src="http://bf2142tracker.com/Images/bf_user_' . $status . '.gif"></td> </tr>'; } echo' </table> '; ?> That will out put http://1337gamerz.recoding.net/2142stats/2142.php I think its is to sorting via global score but something is wrong with the xml feed that is making all global scores 0 :S Quote Link to comment https://forums.phpfreaks.com/topic/73080-php-high-scores-system/#findComment-368644 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.