Hello all,

I would like to set a time after 2 requests that someone can make a request again does anyone have an example for this.

thanks in advance

Recommended Answers

All 2 Replies

Basically what you're looking for is something to manage rate limiting or flood control.

I wrote a little code snippet up that shows the code we are using to manage flood control. We use Redis, a persistent caching mechanism. You can alternatively use Memcached to achieve something very similar.

Another thought, but this will cost you some money if you're not already a Cloudflare subscriber. If you use Cloudflare CDN, they have a pay-per-use frequency capping feature.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.