[PHP] Re: how to post data to java servlet

2004-09-19 Thread Catalin Trifu
Hi, $str = DATA=abcDATA=123DATA=xxx I believe you should encode the string with http://www.php.net/rawurlencode but make sure u don't encode the and = signs. $len = strlen($str); $p = POST /httpsmspp/servlet/sms HTTP/1.0\r\n; $p.= Host: 123.31.228.206\r\n; $p.= Content-type:

[PHP] Re: how to post data to java servlet

2004-09-19 Thread QT
Hi, When I send only one data such as $str = DATA=abc; it is working fine. So that I think, I do not need to use rawurlencode. I made folowing change according your post; again same, when I post only one data field, it works fine. But when use three of them, server comes with error. I think

[PHP] Re: how to post data to java servlet

2004-09-19 Thread QT
hi, And I just realize that if we use text/plain instead of application/x-www-form-urlencoded; gives error. When I use application/x-www-form-urlencoded no problem to send single data Catalin Trifu [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, $str = DATA=abcDATA=123DATA=xxx