PHP zlib support
Posted: Tue Aug 10, 2010 12:54 pm
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
and sends the data (urlencoded) to the server.
I tried the following in the PHP script to decompress the message:
However, this does not give me the actual string that was sent by the client.
What am I doing wrong here?
Thanks in advance.
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)I tried the following in the PHP script to decompress the message:
Code: Select all
$msg = $_POST['compressed'];
$decompressed = gzuncompress($msg);
What am I doing wrong here?
Thanks in advance.