Ver Mensaje Individual
  #5 (permalink)  
Antiguo 25/10/2005, 12:23
tronkis
 
Fecha de Ingreso: octubre-2005
Mensajes: 18
Antigüedad: 18 años, 6 meses
Puntos: 0
ahh y lo estoy haciendo asi:

<?php
if(!isset($_SERVER[PHP_AUTH_USER]))
{
header('WWW-Authenticate: Basic realm="Acceso Restringido"');
header('HTTP/1.0 401 Unauthorized');
echo 'ha cancelado la operacion';
exit;
}

$validado=false;
if(($_SERVER[PHP_AUTH_USER=="admin"])&&($_SERVER[PHP_AUTH_PW=="shosho"]))
$validado=true;

if(!$validado)
{
header('WWW-Authenticate: Basic realm="Acceso restringido"');
header('HTTP/1.0 401 Unauthorized');
echo 'ha cancelado';
exit;
}
?>