decompressing gzip data server side
jbv at souslelogo.com
jbv at souslelogo.com
Mon Aug 2 11:04:46 EDT 2021
Hi list,
I need to post data from an LC standalone to a remote server.
For years, using LC as cgi engine, I have compressed and encoded
the data in base 64 like this :
put base64encode(compress(myData)) into myVar
and then I run the opposite command server side :
put decompress(base64decode(myData)) into myVar
Now I need to post from an LC app to a php script.
According to the LC dict, "compress" uses gzip, so I tried the 2
following php commands :
$data = $_POST['a'];
$a = gzdecode(base64_decode($data));
$a = gzuncompress(base64_decode($data));
But in both cases it returns an empty string. The problem is with
the decompressing step, for the base64 encoded data is received by
the server and decoded without error.
Could someone be kind enough to tell me what I am missing ?
Thanks in advance.
jbv
More information about the use-livecode
mailing list