Results 1 to 2 of 2

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

  1. #1
    Join Date
    Jul 2003

    "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:
    function logoutFromHTTP() 



    "Logout Successfull"

  2. #2
    Join Date
    Dec 2002
    High on life
    First of all, this is a PHP question, so I moved it to the PHP section.

    With PHP Authentication, users are logged out when the browser receives a 401 error, so you shoud be able to log them out with code something like this:

    PHP Code:
    header("WWW-Authenticate: Basic realm=\"My Realm\"");
    header('status: 401 Unauthorized'); 

    Personal website http://www.ryanbrill.com/
    Business website: http://www.infinitywebdesign.com/
    TypeSpace http://www.typespace.org/

    I reject your reality and substitute it with my own!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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