Forum Moderators: coopster

Message Too Old, No Replies

Submit form once per IP address per day

Submit form once per IP address per day

         

dalmar

9:44 pm on Jan 5, 2007 (gmt 0)

10+ Year Member



Hi Everybody!
i am looking for a PHP script form which will send the form only once per IP address in 24 hours!

Thankz in advance!

eelixduppy

9:53 pm on Jan 5, 2007 (gmt 0)



Welcome to WebmasterWorld, dalmar!

I would create a table in a database that logs the ip addresses at the time of the form submit with the current timestamp.

Now each time the form is submitted, you check that table for the person's ip address.

If their ip address does not exist in the db, then you add it to the table as a new row with the current timestamp.

If it does exist, then you check to see if it's be over 24 hours; if so you allow them to submit and you UPDATE that row for their ip address with the new current timestamp. Obviously if it hasn't been more than 24 hours then you deny them.

I hope this explains something :)

If you need further help or run into any roadblocks, you can always ask here.

Good luck!

scriptmasterdel

12:07 am on Jan 8, 2007 (gmt 0)

10+ Year Member



It is important to remember that an IP address can be faked and changed as many times as a person needs to, so this potentially may be a problem in the future for you.

All the best to you,

Del