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
474,266
Messages
2,571,075
Members
48,772
Latest member
Backspace Studios

Latest Threads

Top