Results 1 to 2 of 2

Thread: "How do I log out from HTTP authentication?"

  1. #1
    Join Date
    Jul 2003
    Posts
    9

    "How do I log out from HTTP authentication?"

    Hi there....

    I used UNIX htaccess for Log in to my web page. Inside my code I use MYSQL with PHP but everytime I closed the seeion for MYSQL.

    Now my goal is to logo out from unix server and once I do that no matter how many same web page I have open will be logged out or inactive as for example in hotmail accout if you do log out once you cannot have access for the other hotmail window if there is any open one. I am using following code but it's not working. Please have a look and help me.....

    Thank you.

    PHP Code:
    <html> 
    <head> 
    <title> 
    </title> 
    </head> 
    <body> 
    <?php 
    function logoutFromHTTP() 

    unset(
    $_SERVER['PHP_AUTH_USER']); 
    unset(
    $_SERVER['PHP_AUTH_PW']); 



    logoutFromHTTP(); 

    print 
    "Logout Successfull"
    ?> 
    </body> 
    </html>

  2. #2
    Join Date
    Sep 2002
    Location
    Fantasy
    Posts
    4,254
    I believe in hotmail and yahoo they clear out the session variable and delete the corresponing cookies .

    we do this for all our intranet apps.

    Is there something similar you have in php?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •