|
|
 |
Re: FN-FORUM: Blocking IPs
date posted 1st February 2007 16:28
On Thursday 01 February 2007 17:01, Michelle Penny wrote:
> You're right there is a need to be careful Dai. I actually want to block
> one IP address which I've found is a bot in America. The hosting for the
> site has said I will need to block IPs through php or asp does anyone
> know of a good basic script that allows me to do that having not done it
> this way before!!
Does the hosting support asp or php? It's likely to be one or the other.
It seems odd that they don't support .htaccess if the hosting is linux. I
don't know about Windows hosting. Did my proposed method not work?
Anyway, the PHP solution is that you would check against the
$_SERVER['REMOTE_ADDR'] variable and die on the user if it matched your list.
But you would have to do that for every page, unless you could do a rewrite
for a particular IP address by using .htaccess (anyone?), which is not
helpful if there is no support for .htaccess.
Even then the users could acces images directly.
Regards
Richard
--
Artumi Systems, 58 Salmon Street, Sheffield, S11 8DD.
Tel 0114 250 7654, Web http://www.artumi.com
VAT Reg 889 0317 88
|
 |
|