How can I keep a client from uploading more after having uploaded something within a time limit? Based on IP address.
Basing your disabling on the user's IP address is ineffective. In addition to what Kel said, the client also may have a dynamic IP, or be using Tor.
Really the only way would be to force the user to identify him/herself in some way. There are lots of options out there: Facebook, OpenID, Twitter, etc. You could create a user account system for your site, but that would be much more inconvenient for the user; using an infrastructure that's already in place would be better.
As for the more technical side of things, basically you'll keep a database table of users that have uploaded files, and a timestamp column that holds the time that they uploaded. You'll regularly traverse this table with a Cron job, and remove users that are older than a pre-defined threshold.
When a person attempts to upload, check if they're in the database. If they are, they can't upload; if they aren't, they're good to go.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With