PHP.HTTP аутентификация.
Primary tabs
<html> <head> <title>Proverka Dati</title></head> <body> <? if (! isset ($_SERVER ['PHP_AUTH_USER'])) { header ('WWW-Authenticate:Basic realm ="workgroup"'); header ('HTTP/1.0 401 Unauthorized'); echo 'Noauthorized dostup zapreshen'; exit; } else { echo "Dobro pozhalovat, {$_SERVER ['PHP_AUTH_USER']}." ; } ?> </body> </html>
- Log in to post comments
- 1457 reads