i run an IPB forum.
i was wondering if there was anyway to ban an ip address using a simple php tag?
i also want to be able to add an if statement
i want to ban that up UNLESS they are logged in as a member or something.
i can probably figure that part out, but id like to know how to ban an IP with php.
thanks
ban ip?
Moderator: General Moderators
Code: Select all
if ($_SERVER['REMOTE_ADDR'] == '192.168.1.1')
{
die();
}probably should set it up for future bans too. although you should pull that from a db or text file it'd look like this
Code: Select all
$banned_ips = array(
'192.168.1.1',
'192.168.1.101'
);
if(in_array($_SERVER['REMOTE_ADDR'],$banned_ips)){
die('You have been banned.');
}Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.