分享web开发知识

注册/登录|最近发布|今日推荐

主页 IT知识网页技术软件开发前端开发代码编程运营维护技术分享教程案例
当前位置:首页 > 运营维护

php post提交xml文件

发布时间:2023-09-06 02:02责任编辑:董明明关键词:xml
<?phpheader("Content-type: text/xml;");// xml code demo$xmlData = ‘<?xml version="1.0" encoding="utf-8"?> ???<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> ?????<soap:Body> ???????<execProc_string xmlns="http://tempuri.org/"> ?????????<sql>bk_jskc</sql> ?????????<p></p> ?????????<my>xxxx@163.com#.cn</my> ???????</execProc_string> ?????</soap:Body> ???</soap:Envelope>‘;$url = ‘http://*.*.*.*:8867/Service.asmx?op=execProc_string‘; //接收xml数据的文件$header[] = "Content-type: text/xml";$ch = curl_init($url);curl_setopt($ch, CURLOPT_URL, $url);curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);curl_setopt($ch, CURLOPT_HTTPHEADER, $header);curl_setopt($ch, CURLOPT_POST, 1);curl_setopt($ch, CURLOPT_POSTFIELDS, $xmlData);$response = curl_exec($ch);echo $response;if (curl_errno($ch)) { ???printcurl_error($ch);}curl_close($ch);?>

php post提交xml文件

原文地址:https://www.cnblogs.com/handle/p/9246248.html

知识推荐

我的编程学习网——分享web前端后端开发技术知识。 垃圾信息处理邮箱 tousu563@163.com 网站地图
icp备案号 闽ICP备2023006418号-8 不良信息举报平台 互联网安全管理备案 Copyright 2023 www.wodecom.cn All Rights Reserved