Ver Mensaje Individual
  #4 (permalink)  
Antiguo 09/01/2010, 14:36
AngelG107
 
Fecha de Ingreso: enero-2010
Mensajes: 2
Antigüedad: 14 años, 3 meses
Puntos: 0
Respuesta: Bloquear el acceso a una Web a una lista de IP

Bueno, Dave... la forma mas propia seria usar PHP puro para hacer
esta operacion...

ejemplo :

Código:
<?php
$ip = $_SERVER['REMOTE_ADDR'];

$ip_list = array("91.214.44.228","76.31.76.20");

for($i=0;$i < count($ip_list);$i++){
	if($ip_list[$i] == $ip){
	exit;
	}
}

?>
save that file as : ip_check.php
and at the start of each file in your server add :

Código:
<?php
include("ip_check.php");
?>
remember it should be at the begin or else the page will load
before the check is executed, i guess that's the problem with your
javascript solution.