Login   Register  
PHP Classes

File: test_auth.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Bao Nguyen Quoc  >  Secure Login  >  test_auth.php  >  Download  
File: test_auth.php
Role: Example script
Content type: text/plain
Description: Example 1 (Auth Header)
Class: Secure Login
Login and logout users with HTTP authentication
Author: By
Last change:
Date: 9 years ago
Size: 626 bytes


Class file image Download

include_once "class.securelogin.php";

$auth = new securelogin;
$auth->use_auth true;

if (@
$_GET['a']) {
"Close the window to logout";
"<script language=javascript>window.close();</script>";

if (
$auth->haslogin()) {
"You have login with username : " $auth->username "<BR>";
"Your passhash  : " $auth->passhash "<BR>";
"<a href='test_auth.php?a=1'>Logout</a><br>";
"There is a problem with HTTP Auth header , this will require you to close the window to logout<br>";
} else {