DHS2
12-14-2010, 10:00 PM
Description:
Deny access to IP address array
Installation:
Create a new widget or forum side block (direct php execution)
Title for example "IP Blocker"
Description "IP Blocker Array"
Paste this code on widget configuration and save:
$blacklist = array("127.0.0.1", "127.0.0.1", "127.0.0.1");
if(in_array($_SERVER['REMOTE_ADDR'], $blacklist)) {
header("Location: http://www.fbi.gov");
exit();
}else{
$output = '<center><img src="images/misc/security.png" /></center>';
}
Setup:
change 127.0.0.1 with the ip you want to block
change "security.png" with your desidered image
change "http://www.fbi.gov" with the link desidered to redirect
This is my first version (is a simple code)
If the user's IP number is contained in the array will be redirected to the FBI homepage, otherwise this will print the image. png
Deny access to IP address array
Installation:
Create a new widget or forum side block (direct php execution)
Title for example "IP Blocker"
Description "IP Blocker Array"
Paste this code on widget configuration and save:
$blacklist = array("127.0.0.1", "127.0.0.1", "127.0.0.1");
if(in_array($_SERVER['REMOTE_ADDR'], $blacklist)) {
header("Location: http://www.fbi.gov");
exit();
}else{
$output = '<center><img src="images/misc/security.png" /></center>';
}
Setup:
change 127.0.0.1 with the ip you want to block
change "security.png" with your desidered image
change "http://www.fbi.gov" with the link desidered to redirect
This is my first version (is a simple code)
If the user's IP number is contained in the array will be redirected to the FBI homepage, otherwise this will print the image. png