How can I access request headers that don't appear in $_SERVER?

后端 未结 3 1641
不知归路
不知归路 2020-12-28 19:09

I am attempting to create a REST API in PHP and I\'d like to implement an authentication scheme similar to Amazon\'s S3 approach. This involves setting a custom \'Authorizat

3条回答
  •  别那么骄傲
    2020-12-28 19:34

    There is a fantastic PECL extension that allows for all sorts of HTTP related access. PECL_HTTP and more specifically http://php.net/http and http://php.net/manual/en/function.http-get-request-headers.php.

提交回复
热议问题