[PHP] Query about gzinflate

2005-11-15 Thread kumar kumar
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

With regards
Praveen


 





__ 
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Query about gzinflate

2005-11-15 Thread Curt Zirzow
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.
--

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php