Search
 
SCRIPT & CODE EXAMPLE
 

PHP

Basic HTTP Authentication example

<?php
if (!isset($_SERVER['PHP_AUTH_USER'])) {
    header('WWW-Authenticate: Basic realm="My Realm"');
    header('HTTP/1.0 401 Unauthorized');
    echo 'Text to send if user hits Cancel button';
    exit;
} else {
    echo "<p>Hello {$_SERVER['PHP_AUTH_USER']}.</p>";
    echo "<p>You entered {$_SERVER['PHP_AUTH_PW']} as your password.</p>";
}
?>
Comment

PREVIOUS NEXT
Code Example
Php :: Write Multi-Line Strings in PHP 
Php :: queue jobs in laravel 
Php :: php ascii to decimal 
Php :: share to facebook from website laravel 
Php :: Redirect with named route in Laravel 
Php :: phpdoc example 
Php :: extract in php useful 
Php :: woocommerce custom payment process method 
Php :: relations in php laravel 
Php :: Array (key and value) 
Php :: create symfony project 
Php :: how to pass write post method in lumen 
Php :: laravel return redirect back with input except one filed 
Php :: php save array to files a 
Php :: yii2 change transport 
Php :: laravel send request on tor request 
Php :: Remove Version from CSS and JS 
Php :: en php comment convertir une date en français stackoverflow 
Php :: join with 2 table where id match in table 1 comma separated 
Php :: how i can send by database table in laravel full calendar 
Php :: laravel 8 remove public folder from url 
Php :: PHP utf8_decode — Converts a string from UTF-8 to ISO-8859-1, replacing invalid or unrepresentable characters 
Php :: obtener tipo 
Php :: php jwt firebase 
Php :: cakephp 3 
Php :: php curl get text only 
Php :: laravel eager loading pass variable in withCount where condition 
Php :: remove database in codeigniter 
Php :: share with all blade in laravel 
Php :: php pdo check if record exists before insert 
ADD CONTENT
Topic
Content
Source link
Name
6+5 =