On Sunday 16 November 2003 06:40 am, Manuel Lemos wrote:
> Hello,
>
> On 11/16/2003 02:52 AM, Andre Dubuc wrote:
> > Recently, a 'user' attempted to access a restricted area of my site
> > repetitively (spanning five hours) entering the same url repetitively
> > [probably by script]. A massive log file was generated. I would like to
> > ban such behavior by limiting the number of successive 'get's a user can
> > do (say 4 attempts) before an appropriate action is taken..
> >
> > As a temporary measure (until I can figure a better way) the url in
> > question was disabled.
> >
> > What I'd like to do, on a per-file basis using $_SESSION, is a
> > combination of ipaddress perhaps with a counter that records the number
> > of times that file was accessed, and limit the number of successive
> > 'get's that can be done before the file is no longer accessible.
>
> This solutions will not avoid your problem.
>
> Sometimes I have that problem because some users of my site think they
> can use site sucking programs to get all its content.
>
> What was done is to have a script monitoring the Web server logs and if
> the same user of the same IP makes an excessive amount of accesses in a
> short period, add it to the list of denied addresses for a while. This
> way, the Web server will not even spare resources for abusing users.
>
> Since you use .haccess based permissions, you can just update that file
> regularly.
>
> I do not have that script quite ready for release now, but if there is
> interest, I can release it later as a part of this class that already
> provides log watching services:
>
> http://www.phpclasses.org/logwatcher
>
> --
>
> Regards,
> Manuel Lemos
>
> Free ready to use OOP components written in PHP
> http://www.phpclasses.org/



Thanks Manuel,

Actually I like your idea -- it is much better. However, I do not use 
.htaccess permissions -- When I tried uploading the .htaccess file into the 
docroot area of my site, and it froze the works! 

Basically the idea of using the webaccess log file - searching for repetitive 
usage over a defined period of time (in my case it was every second!) -- 
sounds good. Now, I just have to determine whether I can use .htaccess with 
my IP -- they have very restrictive rules.

Thanks again.
Andre

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to