Recording logins for password protected directories

I have a folder in webroot in http://somesite.com/folderwhich I password protect with the cpanel directory password protection feature, which I assume uses some form htacccess. Therefore, it is not protected by a regular login system, which is connected to a database with which I can check.

After entering the correct username and password, the user can see the contents of the folder

http://somesite.com/folder/index.php

I am trying to find a php way to find out which account was used to enter the folder. Can anyone think of how to do this?

+2
source share
1 answer

$_SERVER['PHP_AUTH_USER'] $_SERVER['PHP_AUTH_PW'].

$_SERVER['PHP_AUTH_DIGEST'] $_SERVER['PHP_AUTH_USER'], , ( ).

+2

Source: https://habr.com/ru/post/1753109/


All Articles