Page 1 of 1

Ip

Posted: Mon Nov 17, 2008 2:18 pm
by radium35
How would you for example restrict the access to 1 ip per 24 hours to a page?

Re: Ip

Posted: Mon Nov 17, 2008 2:26 pm
by pickle
When a page is accessed, record the IP the user has ( look at $_SERVER for that ) and the timestamp it was used. On subsequent accesses, check if an entry exists for the last 24 hours & if it does, only allow users from that IP to continue.

Note though that it is possible to spoof IPs, or even for multiple computers to appear as one IP (think: router).

Re: Ip

Posted: Mon Nov 17, 2008 2:29 pm
by radium35
so i would insert the ip into the DB