Hi, I'm looking for a way to check if an IP has done an action in the past day. I can use MySQL to store the IPs, but I need a way to check if its done the action in the past day. I am making a 'pet link' system, kind of like pokeplushies.com, but the part I'm having trouble keeping someone from refreshing the page over and over to get their pet to the highest level.
I'm kinda a newbie at PHP, so bear with me, please.
1 day IP block?
Started by Zapper, Dec 23 2008 01:12 PM
3 replies to this topic
#1
Posted 23 December 2008 - 01:12 PM
|
|
|
#2
Posted 23 December 2008 - 01:32 PM
You will need to store the IP and last date/time logged in. When someone hits the page, select the date/time and compare it with now.
#3
Posted 23 December 2008 - 04:09 PM
To get an ip address, you can use the remote_addr super global - $_SERVER['REMOTE_ADDR']
#4
Posted 23 December 2008 - 09:29 PM
Thanks, I'm implementing this now. I'm really happy for how this is turning out for my first project in PHP.


Sign In
Create Account


Back to top









