PHP zlib support

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
sanv
Forum Newbie
Posts: 12
Joined: Thu Nov 01, 2007 12:43 pm

PHP zlib support

Post 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.
Post Reply