Publisher review:Ban IP Addresses is dedicated to all those that make returns and false orders. This contribution is dedicated to all those that make returns and false orders.Description:The above code can be modified and new lines can be added to ban a certain list of IP addresses from your website.The exit(); function simply stops the script from that point. Place this at the top of your php scripts to prevent access to those IP addresses listed.InstallationTo locate this line in catalog/default.php or catalog/index.php depending on the version:>Later to put this code:$banned_ip = array(); $banned_ip[] = '111.111.111.111'; $banned_ip[] = '111.111.111.112'; $banned_ip[] = '111.111.111.113'; $banned_ip[] = '111.111.111.114'; foreach($banned_ip as $banned) { $ip = $_SERVER['REMOTE_ADDR']; if($ip == $banned){ echo "You have been banned!"; exit(); } } // rest of PHP Script here! ?>
Ban IP Addresses is a PHP script for osCommerce Addons scripts design by Mircea Teleleu.
It runs on following operating system: Windows / Linux / BSD.
Operating system:Windows / Linux / BSD