Author |
Message |
boxingscene
New Member


Joined: Nov 17, 2003
Posts: 20
|
Posted:
Mon Nov 17, 2003 1:50 pm |
|
I run my site on a dedicated server and there is severe download leeching, I have 4 gigs of download files, people register and try and download all in a single day, when you have 20 register a day, even for a dedicated server, it quickly adds up. There must be a way to limit the leeching of files. Maybe some hack to limit amount per day or amount of transfer per day? Some module? There has to be a better way! I see sites suffer from this every single day using nuke abd this problem has been around forever. I just cant see how to this day, noone has come up with a fix. |
|
|
|
 |
Raven
Site Admin/Owner

Joined: Aug 27, 2002
Posts: 17088
|
Posted:
Mon Nov 17, 2003 9:00 pm |
|
If you allow unlimited downloading then that is not necessarily leeching. Are they 'illegally' downloading w/o linking from your site? Here is an .htaccess script (in my downloads folder) that I'm using that only allows you to download if you're referred from my site (I keep my downloads on a different site).Code:RewriteEngine on
RewriteCond %{HTTP_REFERER} ^$ [OR]
RewriteCond %{HTTP_REFERER} !^http://(.*)ravenphpscripts\.com/.*$ [NC]
RewriteRule .*\.([mpg|mpeg|zip|exe|avi|mov|gif|jpe?g]+)$ - [NC,F]
| Of course change the linking site for your use.
Here's another one I haven't tried but it will redirect leecher's to a document of your choosingCode:RewriteEngine on
# You need the following rule because you can't deny anyone from accessing your leeching.jpg
RewriteRule ^/leeching.jpg$ - [PT,L]
# Here comes the condition
RewriteCond %{HTTP_REFERER} !^http://[^.]+\.YOURSITE\.com/.*$ [NC]
# Send them to leeching.jpg
RewriteRule ^(.*)\.([mpg|mpeg|zip|exe|avi|mov|gif|jpe?g]+)$ http://www.YOURSITE.com/leeching.jpg [R,L]
|
|
|
|
|
 |
boxingscene

|
Posted:
Tue Nov 18, 2003 8:45 am |
|
The problem is I dont want the downloads to be unlimited, is there something that cuts down the amount one can download a day. I need to sets limits. Sometimes my transfer is 18 gigs a day. People are using mass downloading programs. I tried some security code feature someone told me about on nukecops but it doesnt work on 6.9, is there a 6.9 version? even with that, Ive heard about hacks that limit what one user can download per day or amount of transfer but havent seen it for myself.  |
|
|
|
 |
Raven

|
Posted:
Tue Nov 18, 2003 9:05 am |
|
To fully accomplish what you are talking about (to thwart mass downloading programs) would need to be done on the server side, possibly through something link mod_throttle. On a purely user basis, implementing the .htaccess script and the download addon like what I have here will not stop it, but it will cause them some time to do each download. I suppose a mod could be written that keeps track of the number of downloads, per user per day, and locks them out. If you run your own linux server you could use Squid Proxy. |
|
|
|
 |
blith
Client

Joined: Jul 18, 2003
Posts: 977
|
Posted:
Tue Nov 18, 2003 9:11 am |
|
Good morning! Raven, where would you put the code you mentioned and how does it work? Thanks! |
|
|
|
 |
Raven

|
Posted:
Tue Nov 18, 2003 9:25 am |
|
It's all spelled out in my post above  |
|
|
|
 |
blith

|
Posted:
Tue Nov 18, 2003 2:51 pm |
|
oh my goodness!! I was so excited about the info I did not even read it all. My apologies...  |
|
|
|
 |
|