PHP 4.0 Bug #5960: Output buffering and headers
| From: | wico at cnh dot nl | Date: | Fri, 04 Aug 2000 10:40:17 +0000 |
| Subject: | PHP 4.0 Bug #5960: Output buffering and headers | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-27660@lists.php.net to get a copy of this message | ||
From: wico@cnh.nl
Operating system: linux
PHP version: 4.0 Latest CVS (04/08/2000)
PHP Bug Type: Feature/Change Request
Bug description: Output buffering and headers
I d like to see some new function in php working with output buffering and headers
i really like to change the headers that are send elsewhere in the script and/or by php
maybe you can make these functions:
$raw = ob_get_headers();
headers as the way the go to the client (separated by \n?)
$array = ob_get_headers_array();
$array like:
$headers[content-type] = "text/plain"
and ob_clean_headers
to put all the current headers in /dev/null
i can use the functions for:
1. the sessions i made in php
2. to compress pages as gzip
and i guess there a a lot of other options other can/will think about
caps (efnet/#php) started making these functions somethime but he run out of time before he could
finsh the (he got it working for cgi without killing childs :)
i'm not a c programmer (it there where i 48 hours in a day i could learn it :)
so i'am asking i someone / you can make them please
since you can put headers (with outputbuffering on) after your html (and so are stored somewhere in
memmory) i guess it would be to hard to change/clean them and so making those function
Anyway i would be real glad i someone could do this
script would look kinda this:
<?
ob_start();
header("content-type: text/html");
...
$headers = ob_get_headers();
Ob_Clean_Headers();'
$headers[content-type] = "text/plain";
//output new headers
...
?>
Tnx in advance
Greetz,
Wico