开发者

sql database access through javascript game

I have made a basic javascript game of b开发者_如何学Pythonlackjack (21) were the page does not refresh/post. I am wanting it to change a entity in a database (money) with out a user being able to easily access the page/method of changing the database. I was thinking about ajax but even this way a user could finde the page and then access the db. Is there a better way of doing this??? Thanks.


See this question for reference:

Preventing cheating for on-line arcade high score board

Blackjack is a simple enough game however where you can simulate every single variable server side, there is no need for client side processing in your case. Move all your code to the server side, feed the result to the client, feed the clients actions back to the server and it will be for all intents and purposes cheat proof.

This way, the client cant send scores/card ID's etc, only their actions stick|split|draw etc.


Anything the client can do, the client can hack. Javascript is quite open and not secure.

You can type javascript:... in the address bar and execute code arbitrarily, including calling any function in your application.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜