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=abc&DATA=123&DATA=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

Reply via email to