php使用curl提交xml数据

$str_callback_url="xxxx.com/api.php";
$str_callback_url="xml数据";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $str_callback_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 5);
curl_setopt($ch, CURLOPT_POST, 1);
$arr_header[] = "Content-type: text/xml";
curl_setopt($ch, CURLOPT_HTTPHEADER, $arr_header);
curl_setopt($ch, CURLOPT_POSTFIELDS, $str_xml);
$str_return_data = curl_exec($ch);

php使用curl提交xml数据,古老的榕树,5-wow.com

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。