
Alexander Skakunov - 2007-07-17 22:29:15
Hey! The idea is very nice!
Anyway... :]
Please fix this part:
//Ok, I know, it's horrible. I promise fix it soon.
if(!isset($_GET["p"])) exit;
if($_GET["p"] != $this->args["password"] ) exit;
At least, like this:
if ((!isset($HTTP_SERVER_VARS['PHP_AUTH_USER']) ||
$HTTP_SERVER_VARS['PHP_AUTH_USER']!=... ||
$HTTP_SERVER_VARS['PHP_AUTH_PW']!=...))
{
header("WWW-Authenticate: Basic realm=...");
header("HTTP/1.0 401 Unauthorized");
exit("...");
}
Otherwise user gets NO output. I think many developers just thrown you nice class away because of this sad issue.