I would like to implent a feature in my website that limits the access to a certain page.
It should allow 2 access per day per IP.
I was thinking of creating a mysql table and write in the ip+times the ip visited the website and than create a cron job that delets all entries every 24 hours.
But I am worried that his may causes too much server load (in case I get a few hundreth visits a day). Is there a better or simpler method to limit the daily access to two times per IP?
I was also thinking of using cookies or sessions, but I have got 0 plans on how to create a cookie that would do the job I need....
I am thankfull for any suggestions!
EDIT:
Two more things that I would need an advice about, after the helpful comments:
-will a public proxy detection script be enough to keep out at least the anonymous and web proxies?
-is it possible to limit the access for each IP individually and create a script, that will remove the entries for the IP exactly 24 hours after the first visit? Instead of having the cron job delete all data every 24 hours regardless of the time a visitor first came to my site?