Comments on: HOWTO use PHP getallheaders() under FastCGI (PHP-FPM, nginx, etc.) https://www.popmartian.com/tipsntricks/2015/07/14/howto-use-php-getallheaders-under-fastcgi-php-fpm-nginx-etc/ Carpe Crap 'em Wed, 21 Oct 2026 14:52:32 +0000 hourly 1 https://wordpress.org/?v=6.9.10 By: PHP - Get Custom Headers when Using Nginx with php-fpm - Tutorial Guruji https://www.popmartian.com/tipsntricks/2015/07/14/howto-use-php-getallheaders-under-fastcgi-php-fpm-nginx-etc/comment-page-1/#comment-153847 Fri, 23 Jul 2021 08:25:14 +0000 http://www.popmartian.com/tipsntricks/?p=371#comment-153847 […] see various “workarounds” on the net that will define the function if it doesn’t exist, but they all appear to loop over $_SERVER […]

]]>
By: admin https://www.popmartian.com/tipsntricks/2015/07/14/howto-use-php-getallheaders-under-fastcgi-php-fpm-nginx-etc/comment-page-1/#comment-148903 Thu, 11 Apr 2019 15:00:10 +0000 http://www.popmartian.com/tipsntricks/?p=371#comment-148903 @Temirbek Nuradil uulu

It guarantees normalization. The idea is to get to uppercase string separated by hyphens. Spaces and underscores are converted to hyphens in the process.

]]>
By: Temirbek Nuradil uulu https://www.popmartian.com/tipsntricks/2015/07/14/howto-use-php-getallheaders-under-fastcgi-php-fpm-nginx-etc/comment-page-1/#comment-148902 Thu, 11 Apr 2019 14:37:02 +0000 http://www.popmartian.com/tipsntricks/?p=371#comment-148902 Ok say you have to, then why not just directly replace _ to – without first replacing it to space?

]]>
By: Temirbek Nuradil uulu https://www.popmartian.com/tipsntricks/2015/07/14/howto-use-php-getallheaders-under-fastcgi-php-fpm-nginx-etc/comment-page-1/#comment-148901 Thu, 11 Apr 2019 14:35:28 +0000 http://www.popmartian.com/tipsntricks/?p=371#comment-148901 Why replacing underline to space then space to dash? wouldn’t this just work: $headers[ucwords(strtolower(substr($name, 5)))] = $value; ?

]]>