Re: AW: [PHP] Get info if and who is loged in with .htaccess?
| From: | Michelle Konzack | Date: | Thu, 31 May 2018 09:56:27 +0000 |
| Subject: | Re: AW: [PHP] Get info if and who is loged in with .htaccess? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-326503@lists.php.net to get a copy of this message | ||
Grmpf!!!
I am hopeless overworked!
Danke Tobias
Am 2018-05-30 hackte Tobias Fichtner in die Tasten:
> Hi,
>
> of course!
>
>
> Take a look on this sample from Manual:
> https://secure.php.net/manual/en/features.http-auth.php
>
>
> <?php
> if (!isset($_SERVER['PHP_AUTH_USER'])) {
> header('WWW-Authenticate: Basic realm="My Realm"');
> header('HTTP/1.0 401 Unauthorized');
> echo 'Text, der gesendet wird, falls der Benutzer auf Abbrechen
> drückt';
> exit;
> } else {
> echo "<p>Hallo {$_SERVER['PHP_AUTH_USER']}.</p>";
> echo "<p>Sie gaben {$_SERVER['PHP_AUTH_PW']} als Passwort
> ein.</p>";
> }
> ?>
>
>
> Regards,
> Tobias
>
>
> -----Ursprüngliche Nachricht-----
> Von: Michelle Konzack [mailto:linux4michelle@tamay-dogan.net]
> Gesendet: Mittwoch, 30. Mai 2018 07:57
> An: PHP General
> Betreff: [PHP] Get info if and who is loged in with .htaccess?
>
> Good morning,
>
> I need a simple method to give some users access to a webhost and
> like to use the .htaccess to controll the directories which they
> can access
>
> I want to place in each directory an index.php to show the file
> listing, offer uploads and deleting of files, etc.
>
> Question:
>
> Is it possibel from PHP5, to know which authenticated user is
> connecting?
>
> Thanks in advance
>
--
--
Michelle Konzack
00372-54541400
--
######### Do not Cc: me, I am on THE LIST and I do not need ##########
######### messages twice which make it very hard to answer. ##########
------------------------------------------------------------------------
Thanks in advance
--
Michelle Konzack Miila ITSystems @ TDnet
GNU/Linux Developer 00372-54541400