I'm sending Content-type: application/x-gzip to a PHP script, and I successfully write it to a file using the HTTP_RAW_POST_DATA variable, and can then gunzip it. What confuses me is that I *cannot* use the gzinflate function with the same compressed data. In other words, the first method works, but the second does not. Why?
First: $f = fopen("/tmp/foo.gz","w"); fwrite($f,$HTTP_RAW_POST_DATA); fclose($f); $f = gzopen("/tmp/foo.gz","r"); $pixels = gzread($f,250000); gzclose($f); Second: $pixels = gzinflate($HTTP_RAW_POST_DATA,250000); ERROR!! <b>Warning</b>: gzinflate: data error in <b>saver.php</b> on line <b>8</b><br> I don't get it. It's the same data, right? Noisey Apache/1.3.12 (Unix) ApacheJServ/1.1.2 mod_mp3/0.25 PHP/4.0.6 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php