Conditions | 5 |
Paths | 5 |
Total Lines | 18 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
44 | private function getHeaders() |
||
45 | { |
||
46 | if (function_exists('apache_request_headers')) { |
||
47 | return apache_request_headers(); |
||
48 | } |
||
49 | |||
50 | $headers = array(); |
||
51 | foreach ($_SERVER as $k => $v) { |
||
52 | if (strncmp($k, 'HTTP_', 5) == 0) { |
||
53 | $k = substr($k, 5); |
||
54 | } elseif (strncmp($k, 'CONTENT_', 8)) { |
||
55 | continue; |
||
56 | } |
||
57 | $headers[strtr($k, '_', '-')] = $v; |
||
58 | } |
||
59 | |||
60 | return $headers; |
||
61 | } |
||
62 | |||
64 |