
Block Multiple OR Single IP(s) Using PHP
This script will block each IP address you have entered in the array. Simple!
Script Source
<?php
// IP(s) which you would like to block.
$add_block = array('0'=>'84.0.0',
'1'=>'57.255.'
);
// The following then checks the current IP.
foreach($add_block as $list){
if(strstr($_SERVER['REMOTE_ADDR'], $list)){
echo 'oops! Sorry, you seem to be banned from this site!';
exit();
}
}
?>
Please let me know if this script was helpful to you.
[rating]