Getting request headers in PHP
Getting request headers in PHP
* getallheaders(): array: https://www.php.net/manual/en/function.getallheaders.php, it's crappy as it depends on Apache and thus not always present
Other method is reading $_SERVER['HTTP_' . header_name] (all uppercase):
| PHP | |
|---|---|