hey does anyone know where to get a script to ban someone from entering your site with there i.p.? i've looked all over for somthing it but cant find anything thanks
Banning IP Addresses
Started by dirkfirst, May 18 2006 05:21 AM
4 replies to this topic
#1
Posted 18 May 2006 - 05:21 AM
|
|
|
#2
Guest_WebScott_*
Posted 12 June 2006 - 03:05 PM
Guest_WebScott_*
Try this:
<?php
$badIP = '123.123.123.123';
if($_SERVER['REMOTE_ADDR'] == $badIP) {
header('Location: goAway.htm');
}
?>
You'll need to include this on every page using this method through PHP. However, I suspect there's an easier way to block someone using htaccess, assuming you're using apache.
<?php
$badIP = '123.123.123.123';
if($_SERVER['REMOTE_ADDR'] == $badIP) {
header('Location: goAway.htm');
}
?>
You'll need to include this on every page using this method through PHP. However, I suspect there's an easier way to block someone using htaccess, assuming you're using apache.
#3
Posted 13 June 2006 - 02:39 PM
Thank you WebScott! I can create this as a function in a seperate php file and then include it in every webpage I have. This will work perfectly I think.
I haven't found a way to block using apache although I haven't looked into it that much.
I haven't found a way to block using apache although I haven't looked into it that much.
#4
Guest_cpvr_*
Posted 17 June 2006 - 09:11 PM
Guest_cpvr_*
It can also be down via cpanel, just ban the ip using the domain ban thingy.
#5
Guest_Jordan_*
Posted 18 June 2006 - 04:12 PM
Guest_Jordan_*
Yes, plesk also has a feature to block IPs.


Sign In
Create Account


Back to top









