note 50377 deleted from function.session-cache-limiter by nlopess
| From: | nlopess@php.net | Date: | Sat, 26 Feb 2005 20:24:40 +0000 |
| Subject: | note 50377 deleted from function.session-cache-limiter by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-85613@lists.php.net to get a copy of this message | ||
Note Submitter: php dot osde dot info at oths dot co dot uk
Reason: useless
----
Using stream_get_meta_data() and print_r() to display the actual HTTP meta data caching headers that
are automatically generated by session_cache_limiter() :
<?php
echo "<pre>";
$url = 'http://www.osde.info/';
$fp = fopen($url, 'r');
foreach(stream_get_meta_data($fp) as $response)
{
print_r($response);
}
fclose($fp);
echo "</pre>";
?>
Output:
sysdef
Array
(
[0] => HTTP/1.1 200 OK
[1] => Date: Fri, 25 Feb 2005 23:02:29 GMT
[2] => Server: Apache
[3] => Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
[4] => Expires: Thu, 19 Nov 1981 08:52:00 GMT
[5] => Pragma: no-cache
[6] => X-Powered-By: PHP/4.3.10
[7] => Set-Cookie: PHPSESSID=e3afd1b19d41b0eb6cda141a42f3e6fb; path=/
[8] => Connection: close
[9] => Content-Type: text/html
)
HTTPsocket31
nocache
Array
(
[0] => HTTP/1.1 200 OK
[1] => Date: Fri, 25 Feb 2005 23:02:29 GMT
[2] => Server: Apache
[3] => Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
[4] => Expires: Thu, 19 Nov 1981 08:52:00 GMT
[5] => Pragma: no-cache
[6] => X-Powered-By: PHP/4.3.10
[7] => Set-Cookie: PHPSESSID=295204b8f80cd866b231ad284af67753; path=/
[8] => Connection: close
[9] => Content-Type: text/html
)
HTTPsocket31
public
Array
(
[0] => HTTP/1.1 200 OK
[1] => Date: Fri, 25 Feb 2005 23:02:29 GMT
[2] => Server: Apache
[3] => Cache-Control: public, max-age=10800
[4] => Expires: Sat, 26 Feb 2005 02:02:29 GMT
[5] => X-Powered-By: PHP/4.3.10
[6] => Set-Cookie: PHPSESSID=0f35b8c710223bf2d864263a91fdc6dd; path=/
[7] => Last-Modified: Fri, 25 Feb 2005 23:01:11 GMT
[8] => Connection: close
[9] => Content-Type: text/html
)
HTTPsocket31
private
Array
(
[0] => HTTP/1.1 200 OK
[1] => Date: Fri, 25 Feb 2005 23:02:29 GMT
[2] => Server: Apache
[3] => Cache-Control: private, max-age=10800, pre-check=10800
[4] => Expires: Thu, 19 Nov 1981 08:52:00 GMT
[5] => X-Powered-By: PHP/4.3.10
[6] => Set-Cookie: PHPSESSID=e7925ff57233f260c073abefee9554b4; path=/
[7] => Last-Modified: Fri, 25 Feb 2005 23:01:16 GMT
[8] => Connection: close
[9] => Content-Type: text/html
)
HTTPsocket31