<?php
if(isset($_SERVER['PHP_AUTH_USER'])){
 $user = base64_decode($_SERVER['PHP_AUTH_USER']);
}
// here password get
if(isset($_SERVER['PHP_AUTH_PW'])){
	$pass = base64_decode($_SERVER['PHP_AUTH_PW']);
}
$validated = ($user=="mario") && ($pass=="carbonell");
if(!$validated){
    $authorized_user = 'no';
    $record=array('success'=>'false','msg' =>array('Not authorized','Not authorized')); 
    $data = json_encode($record);
    echo $data;
    exit;  
}
?>