note 31137 added to function.getallheaders

From: Date: Thu, 10 Apr 2003 21:55:10 +0000
Subject: note 31137 added to function.getallheaders
Groups: php.notes 
Request: Send a blank email to php-notes+get-46467@lists.php.net to get a copy of this message
This is pure PHP implementation which should work with CGI mode. function getallheaders() { $headers = array(); while (list($key, $value) = each ($_SERVER)) { if (strncmp($key, "HTTP_", 5) == 0) { $key = strtr(ucwords(strtolower(strtr(substr($key, 5), "_", " "))), " ", "-"); $headers[$key] = $value; } } return $headers; } -- http://www.php.net/manual/en/function.getallheaders.php http://master.php.net/manage/user-notes.php?action=edit+31137 http://master.php.net/manage/user-notes.php?action=delete+31137 http://master.php.net/manage/user-notes.php?action=reject+31137

« previous php.notes (#46467) next »