我应该在服务器收到我发送的字符串后收到一个名为“D”的变量。如何让它接收服务器响应消息?
$soapme = curl_init();
curl_setopt($soapme, CURLOPT_URL, $url );
curl_setopt($soapme, CURLOPT_CONNECTTIMEOUT, 10);
curl_setopt($soapme, CURLOPT_TIMEOUT, 10);
curl_setopt($soapme, CURLOPT_RETURNTRANSFER, true );
curl_setopt($soapme, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($soapme, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($soapme, CURLOPT_POST, true );
curl_setopt($soapme, CURLOPT_POSTFIELDS, $post_string);
curl_setopt($soapme, CURLOPT_HTTPHEADER, array('Content-Type: text/xml; charset=utf-8', 'Content-Length: '.strlen($post_string) ));
curl_setopt($soapme, CURLOPT_USERPWD, $user . ":" . $password);
curl_setopt($soapme, curlOPT_VERBOSE, 1);
curl_exec($soapme);
我注意到当我不使用ReturnTransfers时,我得到1。这意味着什么?
答案 0 :(得分:0)
$result = curl_exec($soapme);
echo $result;