Jump to content

Preventing Mass downloads with PHP


fracjidol

Recommended Posts

in a world of proxies and non-static ips.. your ip banning logic will most likely not get rid of the problem, just temporarily stop it.

 

you can detect such a thing though, by having every request point to a landing php file, then that landing file will push out the other file if the request meets the requirements. however, detecting such a thing will be hard because when a user goes to lets say index.php, index.php will count as the first download, then the images inside on index.php will count as other downloads, and according to the log those requests will occur very very close together..

 

you can check for referers and if the second request doesn't carry over a referer value, of a page on your website you can deny the request, but then there is users who will have their browser to not send the referer, then they're gonna get denied all the time..

 

also, if someone is serious about getting all your stuff they'd just set it up via curl and send a referer with every request..

 

this is a hard thing to do :)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.