PHP - авторизация по типу htpasswd
Материал из Wiki - Iphoster - the best ever hosting and support. 2005 - 2024
<?php if ( ($PHP_AUTH_USER != "USER") || ($PHP_AUTH_PW != "PASS")) { Header("WWW-Authenticate: Basic realm="Admin""); Header("HTTP/1.0 401 Unauthorized"); echo("<HTML>n<HEAD>n<TITLE>Restricted Zone!</TITLE>n</HEAD>nn<BODY>nn<center><font size = 20 color=red><b>Access denied!</b></font></center><br><br><br>nnnnnn</BODY>n</HTML>"); } else {