Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php http authentication

// Check auth:
if ($_SERVER['PHP_AUTH_USER']){
	echo "Authorized";
} else {
    header('HTTP/1.1 401 Unauthorized');
	echo "Unauthorized";
}
 
PREVIOUS NEXT
Tagged: #php #http #authentication
ADD COMMENT
Topic
Name
2+7 =