Re: prevent massive ajax requests in PHP
You can't avoid doing the checks on the server. Possible counter-measures:
- add a delay in your answer: a half-second delay will be barely noticed by normal users, but will slow down code
- keep a "last request" time stamp for each user, and reject requests that come within some delay (20-60 seconds)
- lock out users after X posts per hour/day
Warning: unless noted otherwise, code in my posts should be understood as "coding suggestions", and its use may require more neurones than the two necessary for Ctrl-C/Ctrl-V.