I'm sure this wont' help, but just in case you may have missed the obvious
(it happens sometimes<g>)..Make sure you PHP script has the extension .PHP
.. The server won't recognize it as a PHP file otherwise, and it won't know
what to do with it.  Also this extension has to be registred properly on the
server, but that is beyond me.

- John Vanderbeck
- Admin, GameDesign

----- Original Message -----
From: "Thomas Edison Jr." <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, February 15, 2001 2:07 AM
Subject: [PHP] HTTP authentication


> I was browsing thru the http authentication method
> given thru the header() function in the manual. I
> tried it out but it's not giving me the pop-up window
> asking me the username and password and is only
> writing the text given in the code on the page.
> I'm using win98 and otherwise use sun solaris. Does
> this function work on these two OS?
> I have to write a code that checks each time a user
> enters a page, his previously entered user/pwd so as
> to prevent anyone from entering the page if he knows
> and writes the page's URL in the address bar. I've
> used the same authentication method in ASP before for
> the same. Can I use it in my OS using PHP?
> The code I'm entering is:
>
> <?php
> if(!isset($PHP_AUTH_USER)) {
> Header("WWW-Authenticate: Basic realm=\"My Realm\"");
> Header("HTTP/1.0 401 Unauthorized");
> echo "Text to send if user hits Cancel button\n";
> exit;
> } else {
> echo "Hello $PHP_AUTH_USER.<P>";
> echo "You entered $PHP_AUTH_PW as your password.<P>";
> }
> ?>
>
> Regards,
> T.Edison jr.
>
> =====
> Rahul S. Johari (Director)
> ******************************************
> Abraxas Technologies Inc.
> Homepage : http://www.abraxastech.com
> Email : [EMAIL PROTECTED]
> Tel : 91-4546512/4522124
> *******************************************
>
> __________________________________________________
> Do You Yahoo!?
> Get personalized email addresses from Yahoo! Mail - only $35
> a year!  http://personal.mail.yahoo.com/
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to