You can store each player's absolute score in DB and when ranking is requested find the top score and use that to determine percentage for each player to be displayed. Percentile can be determined by dividing the ordered index of each player by the number of all players registered at the time when you're processing the query's results
All of these should be done in your data access layer on the server (or whatever equivalent you have)