api de gestion de ticket, basé sur php-crud-api. Le but est de décorrélé les outils de gestion des données, afin
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

auth_example.php 352B

1234567891011
  1. <?php
  2. if (!isset($_SERVER['PHP_AUTH_USER'])) {
  3. header('WWW-Authenticate: Basic realm="My Realm"');
  4. header('HTTP/1.0 401 Unauthorized');
  5. echo 'Text to send if user hits Cancel button';
  6. exit;
  7. } elseif ($_SERVER['PHP_AUTH_USER']=='user' && $_SERVER['PHP_AUTH_PW']=='pass') {
  8. echo "OK";
  9. } else {
  10. header('HTTP/1.0 403 Forbidden');
  11. }