0

I have some images that are clickable. for each click , users can get some point.

But I want to prevent clicks that do by bots. in fact I want a way to detect that a real user is clicked or a bot.

I want do that in javascript or jquery. if anyone know a plugin that can do that Please introduce me to it.

Ahmad Badpey
  • 6,348
  • 16
  • 93
  • 159
  • You can use reCAPTCHA to detect if user is a bot or not when clicking on image.. But you can't get it on realtime – Gazouu May 10 '18 at 18:26

1 Answers1

0

You can simply assume it’s human, provided access to the page is protected by reCAPTCHA, and subsequent requests carry a CSRF token.

Timir
  • 1,395
  • 8
  • 16
  • Can you explain about carrying a CSRF token? – Ahmad Badpey May 11 '18 at 17:32
  • Sure. CSRF tokens, simply put, establish that the guy at the other end of the HTTP conversation is still the one who initiated it. You don't want a reCAPTCHA session to be shared by a bot (or multiple bots). Now you may be familiar with this already, but here's the relevant OWASP article: https://www.owasp.org/index.php/Cross-Site_Request_Forgery_(CSRF)_Prevention_Cheat_Sheet#Synchronizer_.28CSRF.29_Tokens – Timir May 11 '18 at 18:29