<?php /** * Get HTTP Auth to work with PHP+FastCGI * * @author Jacques Marneweck* @license PHP License v3.01 * / /** * Get HTTP Auth to work with PHP+FastCGI */ if (isset($_SERVER["AUTHORIZATION"]) && !empty($_SERVER["AUTHORIZATION"])) { list ($type, $cred) = split (" ", $_SERVER['AUTHORIZATION']); if ($type == 'Basic') { list ($user, $pass) = explode (":", base64_decode($cred)); $_SERVER['PHP_AUTH_USER'] = $user; $_SERVER['PHP_AUTH_PW'] = $pass; } }