Stop Download managers

This is a discussion on Stop Download managers within the PHP General forums, part of the PHP Programming Forums category; Hi Is there a way to stop download managers on my php webpages?...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 07-05-2007
Pieter du Toit
 
Posts: n/a
Default Stop Download managers

Hi

Is there a way to stop download managers on my php webpages?
Reply With Quote
  #2 (permalink)  
Old 07-05-2007
Daniel Brown
 
Posts: n/a
Default Re: [PHP] Stop Download managers

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.php
>
>


You 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
Reply With Quote
  #3 (permalink)  
Old 07-06-2007
Dan
 
Posts: n/a
Default Re: [PHP] Stop Download managers

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.php
>>
>>

>
> You 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

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 09:50 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0