note 31137 deleted from function.getallheaders by didou

From: Date: Wed, 01 Oct 2003 13:12:44 +0000
Subject: note 31137 deleted from function.getallheaders by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-57534@lists.php.net to get a copy of this message
Note Submitter: dexter@debian.org ---- 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; }

« previous php.notes (#57534) next »