function _eloqua_webform_get_user_headers in Eloqua 6
Same name and namespace in other branches
- 7 eloqua_webform/eloqua_webform.module \_eloqua_webform_get_user_headers()
Returns the user headers filtered for types that shouldn't be needed This function currently is Apache module specific
Return value
array
1 call to _eloqua_webform_get_user_headers()
- eloqua_form_alter in ./
eloqua.module - Implementation of hook_form_alter().
File
- ./
eloqua.module, line 351
Code
function _eloqua_webform_get_user_headers() {
// Getting the request headers only exists in apache
if (!function_exists('apache_request_headers')) {
return array();
}
$headers = apache_request_headers();
// Check to see if the function succeeded or not
if (!$headers) {
return array();
}
$filter = array(
'host',
'cookie',
);
$result = array();
foreach ($headers as $key => $value) {
if (!in_array(strtolower($key), $filter)) {
$result[strtolower($key)] = $value;
}
}
return $result;
}