public static function getAuthorizationHeader()
    {
        $headers = null;
        if (isset($_SERVER['Authorization'])) {
            $headers = trim($_SERVER["Authorization"]);
        } else if (isset($_SERVER['HTTP_AUTHORIZATION'])) {
            $headers = trim($_SERVER["HTTP_AUTHORIZATION"]);
        } elseif (function_exists('apache_request_headers')) {
            $requestHeaders = apache_request_headers();
            $requestHeaders = array_combine(array_map(
                'ucwords',
                array_keys($requestHeaders)),
                array_values($requestHeaders)
            );
            if (isset($requestHeaders['Authorization'])) {
                $headers = trim($requestHeaders['Authorization']);
            }
        }
        return $headers;
    }
public static function getAuthorizationHeader()
    {
        $headers = null;
        if (isset($_SERVER['Authorization'])) {
            $headers = trim($_SERVER["Authorization"]);
        } else if (isset($_SERVER['HTTP_AUTHORIZATION'])) {
            $headers = trim($_SERVER["HTTP_AUTHORIZATION"]);
        } elseif (function_exists('apache_request_headers')) {
            $requestHeaders = apache_request_headers();
            $requestHeaders = array_combine(array_map(
                'ucwords',
                array_keys($requestHeaders)),
                array_values($requestHeaders)
            );
            if (isset($requestHeaders['Authorization'])) {
                $headers = trim($requestHeaders['Authorization']);
            }
        }
        return $headers;
    }
public static function getAuthorizationHeader ( ) { $ headers = null ; if ( isset ( $ _SERVER [ 'Authorization' ] ) ) { $ headers = trim ( $ _SERVER [ "Authorization" ] ) ; } else if ( isset ( $ _SERVER [ 'HTTP_AUTHORIZATION' ] ) ) { $ headers = trim ( $ _SERVER [ "HTTP_AUTHORIZATION" ] ) ; } elseif ( function_exists ( 'apache_request_headers' ) ) { $ requestHeaders = apache_request_headers ( ) ; $ requestHeaders = array_combine ( array_map ( 'ucwords' , array_keys ( $ requestHeaders ) ) , array_values ( $ requestHeaders ) ) ; if ( isset ( $ requestHeaders [ 'Authorization' ] ) ) { $ headers = trim ( $ requestHeaders [ 'Authorization' ] ) ; } } return $ headers ; }
Get hearder Authorization
Get hearder Authorization