How to get the response headers

is there any way, i can get the response headers?


I don’t have .htaccess files in my web root.

any help?

Thank you.

I found one post related to this:

But, that didn’t help…

These particular headers are not set in the example you posted, so logically PHP doesn’t know anything about them either, so their values are null.

sorry…i meant response headers.

I am trying to get these:

But those are null…any idea?
Server: Apache
Vary: Accept-Encoding
Pragma: No-cache
Cache-Control: no-cache,no-store,max-age=0
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Content-Encoding: gzip
Content-Length: 10985
Content-Type: text/html
Date: Fri, 21 May 2010 00:07:31 GMT
Connection: keep-alive

What do you mean by “get the response headers” ?

The headers are not set!
If you don’t know how old I am and someone asks you how old I am, what do you answer? I don’t know.
That’s what PHP is telling you, since the headers are not set, it doesn’t know the values.

Try this:

     echo '<pre>';
     echo '</pre>';