Curl is an option, but I would rather not add an extension to 100 remote servers if possible. I was hoping to find a PHP native way. Thanks, James On Tue, 2007-12-04 at 13:29 -0600, Bill Bolte wrote: > Use Curl and pass XML... > > -----Original Message----- > From: James Crow [mailto:james@xxxxxxxxxxxxx] > Sent: Tuesday, December 04, 2007 1:15 PM > To: php-windows@xxxxxxxxxxxxx > Subject: Errors with urlencode and gzcompress > > Hello all, > > I am having some trouble figuring out how to pass data to a remote PHP > script. > > Here is the scenario: > I have several Windows boxes running Apache 2 and PHP 4. PHP5 is not an > option because of some Zend Encoded scripts that we purchased. I need to > pass data from one script to a remote script. The local script has an > array that is serialized. Then the serialized string is then double > urlencoded. A single urlencode does not work correctly on PHP4/Win32. > The serialized and urlencoded string is then passed in the request to a > remote script: http://192.168.1.2?data=<serialized string> > This process works fine for small amounts of data. If the URL is below a > certain limit (maybe 1024 characters, have not yet found the exact size > limit) this works fine. > > I now have a need to pass more data to the remote script. I have tried > to do > $temp = array ('lots of data...'); > $temp1 = serialize($temp); > $temp2 = gzcompress($temp1); //compress our string first to save space > $temp3 = urlencode($temp2); > $data = urlencode($temp3); > http://192.168.1.1/?data=$data > > Sometimes this works and sometimes not. I have not yet been able to > figure out why this sometimes fails. > > Can anyone tell me why this works sometimes and others not? Or can > someone suggest a better way of passing data to a remote script. > > Thanks, > James > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php