Re: [PHP] very interesting post problem
Thank you, But I don't understand what you mean with body of the post message. Would you explain more or to give an example. Best Regards Raditha Dissanayake [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] QT wrote: Dear Sirs, I need to post 3 string data to destination adres. But I see first time, the name of the variables are same such as DATA. I ask the destination ovner is there any error. Should be the form fields name such as DATA1, DATA2 and DATA3. You appear to be posting to a servlet and according to my understanding the following will be collapsed. $str = DATA=abcDATA=123DATA=xxx Ie only DATA=xxx will be visible to the servlet $len = strlen($str); $p = POST /httpsmspp/servlet/sms HTTP/1.0\r\n; But you are using post. If you add the DATA items to the body of the post message they will be individually accessible by the servlet. -- Raditha Dissanayake. http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader Graphical User Inteface. Just 128 KB | with progress bar. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] very interesting post problem
Dear Sirs, I need to post 3 string data to destination adres. But I see first time, the name of the variables are same such as DATA. I ask the destination ovner is there any error. Should be the form fields name such as DATA1, DATA2 and DATA3. According him, his form is working fine and fields are concenated fields. Then I try to post with following string; but I haven't succed to transfer my string data to other side. What should I do? $str = DATA=abcDATA=123DATA=xxx $len = strlen($str); $p = POST /httpsmspp/servlet/sms HTTP/1.0\r\n; $p.= Host: 123.31.228.206\r\n; $p.= Content-type: application/x-www-form-urlencoded\r\n; $p.= Content-length: $len\n\n; $p.= $str\n; $p.= \r\n; $server = 123.31.228.206; $connection_timeout = 10; $fp = fsockopen ($server, 80, $errno, $errstr, $connection_timeout); fputs ($fp,$p); $recdata = ; while (!feof($fp)) { $recdata .= fgets ($fp,128); } fclose ($fp); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] very interesting post problem
QT wrote: Dear Sirs, I need to post 3 string data to destination adres. But I see first time, the name of the variables are same such as DATA. I ask the destination ovner is there any error. Should be the form fields name such as DATA1, DATA2 and DATA3. You appear to be posting to a servlet and according to my understanding the following will be collapsed. $str = DATA=abcDATA=123DATA=xxx Ie only DATA=xxx will be visible to the servlet $len = strlen($str); $p = POST /httpsmspp/servlet/sms HTTP/1.0\r\n; But you are using post. If you add the DATA items to the body of the post message they will be individually accessible by the servlet. -- Raditha Dissanayake. http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader Graphical User Inteface. Just 128 KB | with progress bar. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php