2015-07-16, 08:22 PM
Is there a way to prevent users from accessing a custom page for more than X times each day?
Basically I would like to make users able to visit that page up to 10 times each day, and then display a no permissions error or another custom message which states that page has been already visited the maximum time allowed for that day.
I guess it's needed a counter in the database which resets itself at midnight or after 24 hours since each request, but I don't know how it can be linked to each user.. ideas?
Basically I would like to make users able to visit that page up to 10 times each day, and then display a no permissions error or another custom message which states that page has been already visited the maximum time allowed for that day.
I guess it's needed a counter in the database which resets itself at midnight or after 24 hours since each request, but I don't know how it can be linked to each user.. ideas?