Sometimes you may want to hide the contents of a page (e.g. admin page) in a very simple manner. The best and simplest method is to use the PHP’s built in HTTP authentication. It’s both secure and compatible with 99% of your visitor’s browsers.

The authentication code must be at the top of the PHP script, otherwise you will usually get a “Headers Already Sent” error.


[ad name=”In Post”]

Leave a Reply

Your email address will not be published. Required fields are marked *