http://www.webcheatsheet.com/php/blocki ... access.php
para descargar el fichero miren al pie de la nota o descarguen aqui
http://www.webcheatsheet.com/php/login_ ... n_page.zip
faltaria agregar una lista de IP proxy en el htaccess y una lista validacion en php de IP negras, por otra parte habria que cambiar la toma de la ip por algo como esto
Código: Seleccionar todo
if ($_SERVER) {
if ( $_SERVER["HTTP_X_FORWARDED_FOR"]) {
$ip_address = $_SERVER["HTTP_X_FORWARDED_FOR"];
} elseif ( $_SERVER["HTTP_CLIENT_IP"]) {
$ip_address = $_SERVER["HTTP_CLIENT_IP"];
} else {
$ip_address = $_SERVER["REMOTE_ADDR"];
}
} else {
if (getenv('HTTP_X_FORWARDED_FOR')) {
$ip_address = getenv('HTTP_X_FORWARDED_FOR');
} elseif (getenv('HTTP_CLIENT_IP') ) {
$ip_address = getenv('HTTP_CLIENT_IP');
} else {
$ip_address = getenv('REMOTE_ADDR');
}
}
saludos!!