note 104307 added to function.getallheaders
| From: | acidfilez at gmail dot com | Date: | Wed, 08 Jun 2011 04:16:11 +0000 |
| Subject: | note 104307 added to function.getallheaders | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-180322@lists.php.net to get a copy of this message | ||
dont forget to add the content_type and content_lenght if your are uploading file:
function emu_getallheaders() {
foreach ($_SERVER as $name => $value)
{
if (substr($name, 0, 5) == 'HTTP_')
{
$name = str_replace(' ', '-',
ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))));
$headers[$name] = $value;
} else if ($name == "CONTENT_TYPE") {
$headers["Content-Type"] = $value;
} else if ($name == "CONTENT_LENGTH") {
$headers["Content-Length"] = $value;
}
}
return $headers;
}
chears magno c. heck
----
Server IP: 109.169.40.147
Probable Submitter: 200.104.228.193
----
Manual Page -- http://www.php.net/manual/en/function.getallheaders.php
Edit -- https://master.php.net/note/edit/104307
Del: integrated -- https://master.php.net/note/delete/104307/integrated
Del: useless -- https://master.php.net/note/delete/104307/useless
Del: bad code -- https://master.php.net/note/delete/104307/bad+code
Del: spam -- https://master.php.net/note/delete/104307/spam
Del: non-english -- https://master.php.net/note/delete/104307/non-english
Del: in docs -- https://master.php.net/note/delete/104307/in+docs
Del: other reasons-- https://master.php.net/note/delete/104307
Reject -- https://master.php.net/note/reject/104307
Search -- https://master.php.net/manage/user-notes.php