if (!isset($_SERVER['PHP_AUTH_USER']) || $_SERVER['PHP_AUTH_USER'] != 'kuser' || $_SERVER['PHP_AUTH_PW'] != 'kPass' ) { header('WWW-Authenticate: Basic realm="xxx.com"'); header('HTTP/1.1 401 Unauthorized');exit; }