Limiting downloads on a webpage by IP address

Miscellaneous Forums/General Discussion/Limiting downloads on a webpage by IP address

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Have a database with IP address as the primary key and two other values: download count and expire time. Whenever someone downloads a file through your script, you find the entry for the IP and increment the counter (and set/reset expire time as needed).

You'd probably want to keep the directory of files outside of the webtree as well, so people cannot directly link to it (and so would need to access your php scripts to get the file)


Or just have special directory and file names that you change regularly (with the download script or a cron job) - maybe not change the actual directory, but just through a .htaccess file.