Description:
A simple and easy PHP script, use to protect your precious web resources from internet surfers.
Features:
- You can specify the user name and password directly
- You can also put some logic between user name and password, like: when user name is 1, the password would be 1+2
- No database is required for this authentication, no complicate logic is involved, no session is needed, no redirection consideration…
- Very easy to locate the code, just put it before the html is output
- Popup a standard http authentication required box
Environment
PHP + Apache + Linux system
Install
- Set up the user name and password in the script file: http_auth.php
- Put the http_auth.php in any place under your website, and use include_once “http_auth.php” in your program’s header part before any html is output.
- It’s done, very simple.