kodie
1/25/2016 - 5:45 PM

Simple PHP Array IP Banning

Simple PHP Array IP Banning

$bannedIPs = array('93.174.93.217');

if (in_array($_SERVER['REMOTE_ADDR'], $bannedIPs)) {
    header('HTTP/1.0 403 Forbidden');
    exit;
}