note 70467 deleted from features.http-auth by nlopess

From: Date: Wed, 18 Oct 2006 08:34:57 +0000
Subject: note 70467 deleted from features.http-auth by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-118678@lists.php.net to get a copy of this message
Note Submitter: info at grafix-house dot com ---- Here some code to logout htaccess basic Auth. <?php if(isset($_POST['logout'])){ ?> <script language="javascript" type="text/javascript"> <?php if (ereg("MSIE", $_SERVER['HTTP_USER_AGENT'])) { ?> document.execCommand("ClearAuthenticationCache"); parent.location.href="/" //redirect after logged out <?php } else { ?> parent.location.href="http://logout:logout@<?php echo $_SERVER['HTTP_HOST']; ?>/<?php echo $_SERVER['PHP_SELF']; ?>"; <?php } ?> </script> <?php } ?>

« previous php.notes (#118678) next »