php[tek] 2018 : Call for Speakers

Voting

Please answer this simple SPAM challenge: two plus two?
(Example: nine)

The Note You're Voting On

xsanychx at mail dot ru
5 years ago
New auth:

<?php
$login
= 'test_login';
$pass = 'test_pass';

if((
$_SERVER['PHP_AUTH_PW']!= $pass || $_SERVER['PHP_AUTH_USER'] != $login)|| !$_SERVER['PHP_AUTH_USER'])
{
   
header('WWW-Authenticate: Basic realm="Test auth"');
   
header('HTTP/1.0 401 Unauthorized');
    echo
'Auth failed';
    exit;
}
?>

<< Back to user notes page

To Top