Password Protection
This free PHP script allows you to protect your web pages with a simple login and password. Instead of linking directly to your main page, visitors must pass through this login script first.
How It Works
Edit the password-protect.php script and update:
$users: your usernames, passwords, and emails$protect: the page to protect$owner,$owneremail: your details$url: the login page location
Important: For better security, place login.html and protected.html in a folder outside the public www or public_html directory. If you keep them public, users might bypass the protection by directly visiting protected.html.
Installation
- Upload the files to your server in ASCII mode.
- Edit
password-protect.phpwith your login details. - Set file permissions (CHMOD) to
755if needed. - Test with your browser.
Password Security
Always use strong, unique passwords. Try these free tools from Xavier Media:
Download
Download the complete package here and start protecting your site today.
If you use this script, please consider linking back to misc.webworld.nu.