Get htpasswd username

H

hgwoss

Hi,

I want to process the current users htpasswd username, which he has
entered in order to access a website.

I would appreciate any info.
 
P

Paul Lalli

Hi,

I want to process the current users htpasswd username, which he has
entered in order to access a website.

I would appreciate any info.

Apache stores this in the REMOTE_USER environment variable. Perl
provides access to the environment variables via the global %ENV hash.
Therefore:

my $username = $ENV{REMOTE_USER};

Paul Lalli
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,733
Messages
2,569,440
Members
44,829
Latest member
PIXThurman

Latest Threads

Top