Re: Stop Download managers
| From: | Dan | Date: | Thu, 05 Jul 2007 23:12:08 +0000 |
| Subject: | Re: Stop Download managers | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-258372@lists.php.net to get a copy of this message | ||
Yeah, but a good portion of Download managers clone the useragent field anyway so this wouldn't really stop them. The only reliable way I've ever heard of people doing this is if they see two connections from the same IP at the same time. I assume you're talking about how to stop download managers from opening multiple connections in an attempt to get a fasterdownload.
But in case you're worried about people using a download manager to download a lot of files or your whole page, then you could have a counter that is incrememted every time a page is accessed in a database, and if that counter ever went over let's say 30 in a minute, it would temporarily ban the IP using .htaccess or something of the like that PHP can write.
- Dan
""Daniel Brown"" <parasane@gmail.com> wrote in message news:ab5568160707051401g31c2ce52led2cebd5f81ec93f@mail.gmail.com...
On 7/5/07, Pieter du Toit <pieter@lpwebdesign.co.za> wrote:Hi Is there a way to stop download managers on my php webpages? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.phpYou could do it by restricting the user agents like so.... <? if(!stristr($_SERVER['HTTP_USER_AGENT'],"mozilla")) { die("We only allow Mozilla browsers in here!\n"); } ?> ---- OR ---- <? if(stristr($_SERVER['HTTP_USER_AGENT'],".net")) { die("You appear to be using a more modern version of Internet Exploder.\n"); } ?> -- Daniel P. Brown [office] (570-) 587-7080 Ext. 272 [mobile] (570-) 766-8107