Search:  

 
 
   All ForumsHot TopicsGallery






how-to block ads


 
Forums » Tech and Talk » OS and Software » Webmasters and Developers » Basic Auth -> PHP Specific Page
Search Topic:
Uniqs:
489
Share Topic:
RSS topic:
toggle:
flat / full
normal / watch
Posting:
Post a:
Post a:
web layout issue »
« Preferred Members  
AuthorAll Replies

utahluge

join:2004-10-14
Draper, UT
·Comcast

Basic Auth -> PHP Specific Page

I have done some searching and maybe I am just not using the right terminology.

What I Have:
- Basic Authentication to a directory.

What I Want:
- Pass that authentication to a PHP page that will get specific data based on the credentials (username).

We need not worry about what the PHP will do, just how to pass the username after authentication to the PHP.

Thanks!!

Shark_615

join:2006-01-17
Pickering, ON
»ca.php.net/features.http-auth


Gwellin
Premium
join:2004-05-31
Regina, SK
·Access Communicati..


1 edit
I was just about to post the same link as Shark_615

Basically you should have the username under $_SERVER['PHP_AUTH_USER']. It's possibly stored in another key however, for example on my DreamHost server I get it from $_SERVER['REDIRECT_REMOTE_USER']. To test this out create a php file within a Basic Auth directory which contains the following:

On the resulting page simply search for the username you logged in with. That is the key under $_SERVER you need to use.

--
I have to come up with a signature now?

utahluge

join:2004-10-14
Draper, UT
Thank you very much! I am only a beginner level with php so this is great!
-
Forums » Tech and Talk » OS and Software » Webmasters and Developersweb layout issue »
« Preferred Members  


Friday, 04-Dec 07:08:53 Terms of Use | Privacy Policy | Hosting by www.nac.net - DSL,Hosting & Co-lo | feedback | contact
over 10 years online! © 1999-2009 dslreports.com.
page compression OFF
Most commented news this week
· [163] Comcast Releasing Promised Usage Meter
· [142] Avast Antivirus Has Gone Mad
· [104] Graduate Student Unveils Sprint's GPS Sharing With Feds
· [103] Comcast Makes NBC Universal Acquisition Official
· [85] Google Invades ISP, OpenDNS Turf With Google Public DNS
· [81] Latest Consumer Reports Survey Not Kind To AT&T
· [70] Baltimore To Ban Lazy Cable Installs
· [66] Sprint Defuses GPS Privacy Media Bomb
· [64] Broadband Killed The Game Console
· [63] FCC Ponders Moving From PSTN To IP Voice
Most people now reading
· False positive in Avast! or is it real? [Security]
· Connecting to Google Voice Via SIP [VOIP Tech Chat]
· [WIN7] Outlook express under Windows 7? [Microsoft Help]
· Windows 7 boot manager editing questions [Microsoft Help]
· [Business] how to bridge a smc 8014 business class modem [Comcast HSI]
· Using AirMax to provide triple play services? [Wireless Service Providers]
· Antenna for both 2.4ghz and 5ghz? [Wireless Networking]
· Warrior tank seem underpowered these days [World of Warcraft]
· [Newsgroups] Newzleech down? [Filesharing Software]
· Heating - my dad gave me this advice... [Home Repair & Improvement]