Ip
Moderator: General Moderators
Ip
How would you for example restrict the access to 1 ip per 24 hours to a page?
Re: Ip
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).
Note though that it is possible to spoof IPs, or even for multiple computers to appear as one IP (think: router).
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Re: Ip
so i would insert the ip into the DB