Page 1 of 1

PHP zlib support

Posted: Tue Aug 10, 2010 12:54 pm
by sanv
Hi,

I have a client that runs a Python script and sends compressed string to a server that runs a PHP script.

The Python script uses

Code: Select all

compressed_message = zlib.compress(string)
and sends the data (urlencoded) to the server.

I tried the following in the PHP script to decompress the message:

Code: Select all

$msg = $_POST['compressed'];
$decompressed = gzuncompress($msg);
However, this does not give me the actual string that was sent by the client.

What am I doing wrong here?

Thanks in advance.