Re: compressed buffered output
| From: | Zeev Suraski | Date: | Mon, 20 Nov 2000 12:38:04 +0000 |
| Subject: | Re: compressed buffered output | ||
| References: | 1 2 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-38586@lists.php.net to get a copy of this message | ||
At 13:46 20-11-00, André Langhorst wrote:
Telnet HTTP query...That should work... Works For Me (TM) :)1) well how did you check it (that it has been sent compressed)?
2) due to my failures checking what a browser would get I decided to write the compressed stream to a file, doesn't fflush() work with OB functions? if not it should be fixed somehow, it's a very helpful function... neither "ob_gzhandler" nor () fill my file with anything (both linux+w32) $a=50; ob_start("ob_gzhandler"); echo str_repeat('a',$a); $fp=fopen('test.txt','w+b'); fflush($fp); ob_end_flush(); 3) it does not work, ok. so I could not test - what is ob_get_contents() supposed to return a) compressed buffers b) uncompressed buffersob_get_contents() returns the uncompressed buffer.
if it's (b) it would be very handy to access the compressed (encrypted,... whatever will follow) string if I don't want to use fflush() eg. passing to DB,cookie,field,system... whateverI added a function named gzencode() - you can use it to compress data in the gzip encoding format, unrelated to the output buffering mechanism. Zeev -- Zeev Suraski <zeev@zend.com> CTO, Zend Technologies Ltd. http://www.zend.com/