PHP_AUTH_USER
| From: | Kevin Heflin | Date: | Thu, 14 Sep 2000 02:46:08 +0000 |
| Subject: | PHP_AUTH_USER | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-16677@lists.php.net to get a copy of this message | ||
I have a link to a web page which is password protected using:
if(!isset($PHP_AUTH_USER)) {
Header( "WWW-authenticate: basic realm=\"highlifter\"");
Header( "HTTP/1.0 401 Unauthorized");
etc...
Assuming I already know what a users' username and password are, is there
a way to include this in the link or pass it along some other way so the
user wouldn't have to get the browser dialog box asking them to log in ?
I've tried assigning $PHP_AUTH_USER=$username but this didn't work.
I've tried creating a link like http://username:password@www.domain.com,
this works, in that it allows the user to hit the initial page without
logging in, but links to other pages with the same authentication scheme,
will give the dialog box.
Kevin
--
--------------------------------------------------------------------
Kevin Heflin | ShreveNet, Inc. | Ph:318.222.2638 x103
VP/Production | 333 Texas St #175 | FAX:318.221.6612
kheflin@shreve.net | Shreveport, LA 71101 | http://www.shreve.net
--------------------------------------------------------------------