note 50378 added to function.header

From: Date: Sat, 26 Feb 2005 05:56:07 +0000
Subject: note 50378 added to function.header
Groups: php.notes 
Request: Send a blank email to php-notes+get-85575@lists.php.net to get a copy of this message
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 ---- Manual Page -- http://www.php.net/manual/en/function.header.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+50378 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+50378&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+50378&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+50378&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+50378&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+50378&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+50378&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#85575) next »