HTTP Authentication in PHP

HTTP authentication or basic authentication is formally defined in Hypertext Transfer Protocol standard. When a client connects to a web server, it sends a "WWW-Authenticate: Basic" message in the HTTP header. After that, it sends login form to client for authentication.

Click here for HTTP authentication example in PHP