Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (empty($this->input->server('PHP_AUTH_USER')))
- {
- header('HTTP/1.0 401 Unauthorized');
- header('HTTP/1.1 401 Unauthorized');
- header('WWW-Authenticate: Basic realm="My Realm"');
- echo 'You must login to use this service'; // User sees this if hit cancel
- die();
- }
- $username = $this->input->server('PHP_AUTH_USER');
- $password = $this->input->server('PHP_AUTH_PW');
- // Check username and password
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement