How to get the response headers

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

like: HTTP_IF_MODIFIED_SINCE?

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

any help?

Thank you.

I found one post related to this:
http://www.php.net/manual/en/function.apache-request-headers.php#74592

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:
<?php
$_SERVER[‘HTTP_IF_MODIFIED_SINCE’];
$_SERVER[‘HTTP_IF_NONE_MATCH’];
?>

But those are null…any idea?
Example:
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:


  <?php
     echo '<pre>';
        print_r($_SERVER);
     echo '</pre>';
  ?>


.