Windows Authenticate
This page includes win_authenticate.php that is a sort of index to the php scripts win-compatible and also is the target of re-addressing in case the data are not sent properly , or are not convalidated from one of the demonstrations from here linked.
The page at link : "auth_pop.php " and layoutted here at right side returns from a Web Server a system pop up that appears a few times and require the surfer to authenticate himself as a member.
The script auth_pop.php does not work on a Cgi Apache Version on Windows-localhost , so use instead one of the following linked logins :
<?
# Name of the file auth_pop.php = members...php
if (!isset($PHP_AUTH_USER)) {
header('WWW-Authenticate: Basic realm="Ehi! Reserved Folder"');
header("HTTP/1.0 401 Unauthorized");
echo "Authorization required !"; exit;} else {
# Are the data correct ? They are not ! Then ...
if (( $PHP_AUTH_USER != "vittorio") || ($PHP_AUTH_PW != "qwerty"))
{ Header("WWW-Authenticate: Basic realm=\"Ehi! Reserved Folder\"");
Header("HTTP/1.0 401 Unauthorised"); echo"Try again..."; exit; } }
# Are the data correct , then ... members...php
echo "You are logged in ! Well done , User $PHP_AUTH_USER";
?>
members  ...after having logged in one of the following : cookies session
X Apache Version (win-localhost/web)
Effective members login here first   ↓
( Session Login is required ) Web Server Login  
Code of login scripts
You will set the following code at the beginning of each page that you want to reserve to your members' only ( cookies-based ) :
<?
# File members...php (... redirects if data are not set ! )
if(!isset($PHP_AUTH_USER) || !isset($PHP_AUTH_PW))
{header("Location:http://localhost/@/pw.php"); exit;}
?>
<html> ... Reserved Page ... </html> home