We are creating a gaming site.
There will be alot off different games and all the progress off the registered players will be saved and the score compared to other players.
The flow will be like this:
- The Player logs in
- He choose a game
- Play the game and gets a score
- The browser is redirected and the Score used in my logic
I've been testing out different ways to do this, for example using the browser object and adding the score to a parameter in the URL, but this approach will be easy to manipulate.
I also tried using Web storage to save the progress in the session and then retreive the score again from the web page that the game redirects to after the game end, but I was not able to retreive the Score. I used this javascript on that page
<script type="text/javascript">
document.write(localStorage.getItem("Score"));
</script>
Can anyone help me with a good and secure way of doing this?