Share on Facebook Share on Twitter

Password protect your content with Web Page Password Protect by just adding one line of PHP code to your page source. Script will present user with password entry form, and will not let visitor see your private content without providing a password.
Multiple user accounts support, improved security, automatic logout, and manual logout feature.

Usage:

Save protect_pass.php somewhere on your server
Update it with your desired password or login/password pair. Use any plain text editor to accomplish this step. Sample editors: Notepad (Windows) or vi (Unix).
Open script in your browser with “trogiup” parameter to see the line of code to add to every page you would like to be password protected.
Example:

It will show you protection code to include into your pages. Sample protection code would look like this (yours will be different):

Add that line of code to each php page you would like to protect at the very beginning of the page source (it must be the first line).
For example you want to protect page protect-me.php. Open it for editing, and add the protection string (see above on how to get the protection string) at the beginning. So resulting code would look like

This is full code: protect_pass.php

Demo here: http://demo.bienthuy.com/php/protect/protect_pass.php

Other Posts you may be interested in:

  1. Joomla Fix Out of sort memory, consider increasing sort buffer size
  2. Automatically deleting cache folder using PHP & Cron Jobs
  3. Cách cài đặt Ccleaner để dọn rác máy tính – Phần 2
  4. Chọn tuổi kết hôn – chọn chồng/vợ hợp tuổi
  5. Fix “Microsoft excel cannot open or save any more documents…”
  6. Mồ hôi dầu: cách khắc phục mồ hôi dầu ở mặt, đầu, lưng và nách
  7. Hướng dẫn sửa lỗi font chữ tiếng Việt trong Microsoft Excel và Microsoft Word

Last updated on July 13th, 2020 at 09:42 pm

What do you think?

x
This website is using cookies. More info. That's Fine