Re: http header question
| From: | Philip Hallstrom | Date: | Fri, 22 Dec 2000 01:36:29 +0000 |
| Subject: | Re: http header question | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-31512@lists.php.net to get a copy of this message | ||
If I understand you right, you should be able to use the global varialbe
$PHP_AUTH_USER (or something very close to that) in those pages. To
double check add a phpinfo() in one of those pages and see if that
variable is set to the username entered.
-philip
In article <5.0.0.25.2.20001221170943.0201b0d0@mail.wildpackets.com> you write:
>All -
>
>I have some directories on an Apache server which contain PHP scripts that
>access a Mysql database. These directories are password protected using
>Basic Authentication (.htaccess files, etc ).
>In order to log activity carried out through the scripts in these
>directories, I'd like to be able to have the PHP code access which logins
>are accessing the scripts. As this information is passed in clear text
>through the http headers requesting the pages generated by the script, I
>would imagine it should be pretty simple to grab the info.
>
>But I am not sure exactly how to go about it. Any ideas?
>
>TIA.
>
>Kevin McCarthy Body & Soul
>http://www.bodynsoul.com