×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: PHP
Posted by: Peter Hempel
Added: Jan 29, 2017 6:22 PM
Views: 14
Tags: no tags
Quelle : php ergänzt mit md5
  1. if (!isset($_SERVER['PHP_AUTH_USER'])) {
  2.     header('WWW-Authenticate: Basic realm="My Realm"');
  3.     header('HTTP/1.0 401 Unauthorized');
  4.     exit;
  5. }
  6.  
  7.     if(md5 ($_SERVER['PHP_AUTH_PW'])!= 'd02d341997885dd581f99d8df57a8ae7')
  8.     exit;
  9.    
  10.    
  11. // OK, gültige Benutzername & Passwort