Rev cgi, PHP & XML
jbv.silences at club-internet.fr
Wed Aug 22 14:39:27 CDT 2007
It's me again with another weird question... this time for php
I have a Rev cgi script that returns some xml data to a client browser.
In order to speed up downloading, I'm trying to compress the data
using gzip via some php functions (such as gzencode or gzcompress).
I had to use that technique because Rev compress() function doesn't
output code suitable for browsers...
Anyway, here's my code :
- in Rev cgi script
get shell("/usr/local/bin/php /home/httpd/html/cgi-bin/gzcompress.php "
- in php
$myString = $argv;
$myStringgz = gzencode( $myString , 9 );
This works fine for any non-XML data. As soon as I try to pass XML data
to the php script,
I get this error :
/bin/sh: line 1: syntax error near unexpected token `<'
Could someone be kind enough to tell me what I'm doing wrong ?
Is there any specific gzlib function for xml data ? I haven't found
anything like that in php doc...
Any help greatly apreciated. Thanks in advance,
More information about the use-livecode