Jump to content

Protected Dirctory Username In Php Script


Recommended Posts

Hello,

 

How do I get the currect username typed on the pop-up password dialog box after the user is in the protected directory?

I mean, the user get the pop-up, type in his user name and password and then I want the php script to grab him username as varabile.

 

Somthing like

>$username= .....;

 

I just don't know what is the missing "....." :P

Link to post
Share on other sites

Welcome to the forum, ronenb75 :)

I mean, the user get the pop-up, type in his user name and password and then

I want the php script to grab him username as varabile.

What php script are you using for the log in?

it must already be using a variable for the user name.

Link to post
Share on other sites
Welcome to the forum, ronenb75 :)

 

What php script are you using for the log in?

it must already be using a variable for the user name.

 

I'm using any script yet.

I'm talking about the pop-up that the server brings when you get into protected directories.

I'm tring to catch the username from that pop-up windows, but it's script that hidden from us, as much as I know....

Link to post
Share on other sites
I think you will need to use your own login script

some kind of folder login script

I would look on hotscripts.com

 

It's kinda wierd.... the web server should know how the user that login to the pages, it should have been saved somewhere during all the session. Maybe I could read it from a cookie or something....

 

I asked the support, but don't help with these kind of stuff....

Link to post
Share on other sites

Welcome to the forums, ronenb75! :)

 

There's a number of ways to get the username who logs into a password protected directory. One of the following should work for you:

>$username = $_SERVER['REMOTE_USER'];

>$username = $_SERVER['PHP_AUTH_USER'];

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...