note 19493 added to features.http-auth
| From: | dylan at capebyronimports dot com dot au | Date: | Thu, 28 Feb 2002 22:49:58 +0000 |
| Subject: | note 19493 added to features.http-auth | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-27201@lists.php.net to get a copy of this message | ||
I use apache's built in support for .htaccess, and the following function to grab user details
as required.
Function GetHttpAuth()
{
$headers = getallheaders();
$auth=explode(" ",$headers[Authorization]);
if ($auth=='') { $auth=explode(" " ,$headers[authorization]); }
$authdec=base64_decode($auth[1]);
$autharray=explode(":",$authdec);
$authname=$autharray[0];
$authpass=$autharray[1];
return($autharray);
}
--
http://www.php.net/manual/en/features.http-auth.php
http://master.php.net/manage/user-notes.php?action=edit+19493
http://master.php.net/manage/user-notes.php?action=delete+19493
http://master.php.net/manage/user-notes.php?action=reject+19493