Re: Query about gzinflate

From: Date: Wed, 16 Nov 2005 06:01:34 +0000
Subject: Re: Query about gzinflate
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-225902@lists.php.net to get a copy of this message
On Tue, Nov 15, 2005 at 09:28:22PM -0800, kumar kumar wrote: > HI > > How to uncompress compressed data with php://input > > Which one of the following is correct > > 1 .$unzip = gzinflate("php://input","r"); > $getdata = fopen($unzip."r"); > > 2. gzcompress("php://input","r"); > > $getdata = fopen($unzip."r"); > > what the best solution help me neither. I'm not sure what you expect to happen in both cases. gzinflate expects a string and returns a string.. which is invalid for fopen(). with gzcompress (besides that the parameters being wrong) i dont know how you expect it to uncompress, and it also returns a string which is invalid for fopen(). perhaps you ment: 1) $getdata = gzopen('php://input', 'r'); see: http://php.net/gzopen 22 $getdata = fopen('php://filter/gzinflate/resource=php://input'); see: http://php.net/manual/en/filters.compression.php Curt. --

« previous php.general (#225902) next »