1
\$\begingroup\$

This question already has an answer here:

I have a virtual world game that I developed with jQuery, AJAX and PHP. Virutal World like club penguin. Now, I want to add a game into the virtual world - like bubbles or whatever. The main problem its that the game in ajax, so if the player got 20 points in the game - in the ajax request I have the player points and the player can change the ajax request to any points that he want. How can I do it secured? Thanks

\$\endgroup\$

marked as duplicate by Bálint, Vaillancourt Mar 22 '18 at 13:21

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    \$\begingroup\$ Why do you think, that if this was closed the first time (based on the [on hold] in the question body), that it won't get closed this time? \$\endgroup\$ – Bálint Mar 22 '18 at 9:34
  • 1
    \$\begingroup\$ @Bálint His question was set on hold at stackoverflow because a moderator suggested him to post here instead \$\endgroup\$ – DarkBee Mar 22 '18 at 9:37
  • \$\begingroup\$ Ahh, understandable \$\endgroup\$ – Bálint Mar 22 '18 at 9:39
  • \$\begingroup\$ The short answer is "You can't; run your logic on the server." See also gamedev.stackexchange.com/questions/37392/… and gamedev.stackexchange.com/questions/113281/…. \$\endgroup\$ – Vaillancourt Mar 22 '18 at 13:25
  • \$\begingroup\$ @AlexandreVaillancourt Hi dude, What to do In the end, I did not really understand what these articles you brought me. Is there any code that actually tells me how to hide the code from the user? \$\endgroup\$ – Ben Mar 22 '18 at 14:24

Browse other questions tagged or ask your own question.