note 13827 deleted from function.getallheaders by irc-html
| From: | irc-html@php.net | Date: | Sat, 19 Jan 2002 20:44:26 +0000 |
| Subject: | note 13827 deleted from function.getallheaders by irc-html | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-25417@lists.php.net to get a copy of this message | ||
I use this code to set PHP_AUTH_USER and PHP_AUTH_PW from the authorization header when running as
CGI.
if ($PHP_CGI) {
$A = split(' ', getenv("HTTP_AUTHORIZATION"));
$up = base64_decode($A[1]);
$PHP_AUTH_USER = substr($up,0,strpos($up,':'));
$PHP_AUTH_PW = substr($up,strpos($up,':')+1);
}