home

Quickies, by Andrea Olivato

text

[PHP] How to retrive HTTP headers

codepuzzling:

Anyway response header returned by apache_response_headers() consists only of server signature in my case, but in firebug I can see a lot more of them.

$var = "REQUEST";
foreach (apache_request_headers() as $name => $value) {
    $var.= "$name: $value
"; } $var.= "RESPONSE"; foreach (apache_response_headers() as $name => $value) { $var.= "$name: $value
"; } echo $var;

2 years ago

June 5, 2009
reblogged via codepuzzling
Comments (View)
blog comments powered by Disqus