Password Protector will
automatically logout user when browser is closed (if TIMEOUT_MINUTES is set to 0).
But script also supports a
manual logout feature which you may find useful.
In order to implement manual logout feature you'll have to accomplish following steps:
1. Setup logout URL in the scriptIf you look at the password_protect.php source code you'll see following
// User will be redirected to this page after logout
define('LOGOUT_URL', 'http://www.example.com/');
2. Add Logout link on your websiteAdd following HTML code on your site pages wherever you want a logout link to be shown
<a href="http://www.example.com/path/to/protected/page.php?logout=1">Logout</a>
Upon logout script will redirect user to the URL you specified on step 1.