PHP Classes

File: examples/simple-include.php

Recommend this page to a friend!
  Classes of Tony   twzAuth   examples/simple-include.php   Download  
File: examples/simple-include.php
Role: Example script
Content type: text/plain
Description: example script
Class: twzAuth
Authenticate users using HTTP Basic authentication
Author: By
Last change:
Date: 9 years ago
Size: 406 bytes
 

Contents

Class file image Download
<?php
/*
    twzAuth-include.php (simple mode)

    If you only have one page to protect, these commands can be in that script.
    We've used this include file to make it easier to protect multiple pages.

*/

$ValidUsers=array('user_1'=>'wr$5trTygY67I86', 'user_2'=>'deFgt%4ddChg7*6');

require
'../twzAuth.class.php';
$auth=new twzAuth($ValidUsers);

$Username = $auth->validate();


?>