Hi guys, I need some help with a math game I created. It is programmed in Javascript and PHP, with most of the actual game play in Javascript. Once the player completes the game, the scores are sent to PHP via JSON and then are stored in the database.
I'm concerned that some people will cheat. While I know I can't prevent them from editing the Javascript code, I would like to stop them from being able to submit anything if they have. I thought of a way to do it using PHP, but I don't know if it's possible to get the data I need to do it.
My idea is to create a digital tamper proof sticker. Instead of just sending the score and stats, I'd like to send the file size and/or the contents of the client side Javascript file to PHP to compare it to the server's copy before accepting their information. If it matches the server copy, the submission would be accepted, but if it fails it would show an error.
Is this possible?
The data should be stored somewhere, but the question is can I get access to it? and if so, how?
I'm new to Javascript so I'm still learning what's possible and what's not.
Thanks in advance.
برچسب:
نویسنده: آیلین رضوانی
تاريخ: شنبه
17 تير
1396 ساعت: 21:34