I need to limit the access to a PHP web page for a user identified by IP address only 5 times a day.
I have done this funcionality with sessions, but in the requirements I have to that with IP Adresses abd not with sessions.
Any idea on the simplest method to do that?
Thanks a lot.
First, create a table with columns such as:
Then on each view either insert the IP (if its not already in the database) or increment views by 1. If views = 5 then kill the page and don’t allow the user to visit.
You can then run a cron each night at 00:00 that deletes all data in the table (see:
truncate).