Thanks Juan Pablo Califano. I'm already sending the data in binary form so that's is probably not the problem. You are right about that the php decompression should be done with gzinflate (I did test with it before but that didn't work either so I thought I should try gzuncompress ;)
When I compare the deflating results of the same string in PHP and Flash I noticed that flash started with two extra bytes while the rest of the output was the same. Next I added this code to the PHP test script to remove the two extra leading bytes: mb_internal_encoding("UTF-8"); $encoded = mb_substr($_POST["XMLString"], 2); Now when I compare the string in $encoded with the encoded string produced by PHP deflate() then both seem to be exactly the same. So I expected that $decoded = gzuncompress($encoded); would now return the original string but no, an empty string is returned!? If however I copy (i.e. hardcode) the compressed string into $encoded and then execute $decoded = gzuncompress($encoded); Then it Works; I get the original text!? Big question now why does it work with the hardcoded compressed string and not with runtime compressed string, they seem to be exactly the same?? Any ideas? BTW: thanks for your time :) _______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders