pbootcms网站模板|日韩1区2区|织梦模板||网站源码|日韩1区2区|jquery建站特效-html5模板网

<legend id='qcHD2'><style id='qcHD2'><dir id='qcHD2'><q id='qcHD2'></q></dir></style></legend>

      <tfoot id='qcHD2'></tfoot>

        • <bdo id='qcHD2'></bdo><ul id='qcHD2'></ul>
      1. <i id='qcHD2'><tr id='qcHD2'><dt id='qcHD2'><q id='qcHD2'><span id='qcHD2'><b id='qcHD2'><form id='qcHD2'><ins id='qcHD2'></ins><ul id='qcHD2'></ul><sub id='qcHD2'></sub></form><legend id='qcHD2'></legend><bdo id='qcHD2'><pre id='qcHD2'><center id='qcHD2'></center></pre></bdo></b><th id='qcHD2'></th></span></q></dt></tr></i><div class="pptdlxh" id='qcHD2'><tfoot id='qcHD2'></tfoot><dl id='qcHD2'><fieldset id='qcHD2'></fieldset></dl></div>
      2. <small id='qcHD2'></small><noframes id='qcHD2'>

        Php SoapClient stream_context 選項(xiàng)

        Php SoapClient stream_context option(Php SoapClient stream_context 選項(xiàng))

        1. <i id='EAuDo'><tr id='EAuDo'><dt id='EAuDo'><q id='EAuDo'><span id='EAuDo'><b id='EAuDo'><form id='EAuDo'><ins id='EAuDo'></ins><ul id='EAuDo'></ul><sub id='EAuDo'></sub></form><legend id='EAuDo'></legend><bdo id='EAuDo'><pre id='EAuDo'><center id='EAuDo'></center></pre></bdo></b><th id='EAuDo'></th></span></q></dt></tr></i><div class="lj7xjpx" id='EAuDo'><tfoot id='EAuDo'></tfoot><dl id='EAuDo'><fieldset id='EAuDo'></fieldset></dl></div>
        2. <small id='EAuDo'></small><noframes id='EAuDo'>

          • <bdo id='EAuDo'></bdo><ul id='EAuDo'></ul>

              <tbody id='EAuDo'></tbody>
              <legend id='EAuDo'><style id='EAuDo'><dir id='EAuDo'><q id='EAuDo'></q></dir></style></legend>

                  <tfoot id='EAuDo'></tfoot>
                • 本文介紹了Php SoapClient stream_context 選項(xiàng)的處理方法,對(duì)大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  限時(shí)送ChatGPT賬號(hào)..

                  我想使用第三方的網(wǎng)絡(luò)服務(wù).要使用 Web 服務(wù),我需要使用 HTTPS 連接.我的問題是,對(duì)于開發(fā)過程,我有一個(gè)帶有無效證書的測(cè)試 api.我想設(shè)置 SoapClient no 來驗(yàn)證服務(wù)器的證書.這是我嘗試的方法:

                  I want to use a third party's web service. To use the web service I need to connect with HTTPS. My problem is that for the development process I have a test api with an invalid certificate. I would like to set SoapClient no to verify the server's certificate. Here is the way I tried:

                  $opts = array(
                      'ssl'   => array(
                              'verify_peer'          => false
                          ),
                      'https' => array(
                              'curl_verify_ssl_peer'  => false,
                              'curl_verify_ssl_host'  => false
                       )
                  );
                  $streamContext = stream_context_create($opts);
                  $client = new SoapClient("https://urlToSoapWs",
                    array(
                        'login'             => 'user',
                        'password'          => 'pwd',
                        'authentication'    => SOAP_AUTHENTICATION_BASIC,
                        'local_cert'        => file_get_contents('C:/somelocation/1.pem'),
                        'passphrase'        => 'passphrase',
                        'stream_context'    => $streamContext
                    ));
                  

                  我也嘗試過 CURL 并且成功了!但我想使用 SoapClient.您可以在下面找到帶有 CURL 的代碼:

                  I also tried with CURL and worked! But I want to use SoapClient. You can find the code with CURL below:

                  // create a new cURL resource
                  $ch = curl_init("https://urlToSoapWs");
                  
                  // setting the request type to POST: 
                  curl_setopt($ch, CURLOPT_POST, 1);
                  
                  curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: text/xml")); 
                  // setting the authorization method to BASIC: 
                  curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC); 
                  // supplying your credentials: 
                  curl_setopt($ch, CURLOPT_USERPWD, "user:pwd");
                  
                  $body = "<SOAP-ENV:Envelope>somexmlhere</SOAP-ENV:Envelope>";
                  // filling the request body with your SOAP message: 
                  curl_setopt($ch, CURLOPT_POSTFIELDS, $body);
                  
                  // configuring cURL not to verify the server certificate: 
                  curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
                  curl_setopt($ch, CURLOPT_SSLCERT, "pathToTheCertificatePemFile");
                  curl_setopt($ch, CURLOPT_SSLCERTPASSWD, "pwd");
                  //curl_setopt($ch, CURLOPT_SSLCERTTYPE, "PEM");
                  
                  curl_setopt($ch, CURLOPT_SSLKEY, "pathTotheKeyFile");
                  curl_setopt($ch, CURLOPT_SSLKEYPASSWD, "pwd");
                  
                  // telling cURL to return the HTTP response body as operation result 
                  // value when calling curl_exec: 
                  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 
                  // calling cURL and saving the SOAP response message in a variable which 
                  // contains a string like "<SOAP-ENV:Envelope ...>...</SOAP-ENV:Envelope>": 
                  
                  
                  $result = curl_exec($ch);
                  // closing cURL: 
                  curl_close($ch);
                  

                  如果您在我使用 SoapClient 提供的代碼中發(fā)現(xiàn)了錯(cuò)誤,請(qǐng)發(fā)布它.謝謝.

                  If you have found the bug in the code that I provided using the SoapClient please post it. Thanks.

                  推薦答案

                  也許不是無效的證書是個(gè)問題,更多的是 SSLv2/3 Handshake;您可以嘗試像這樣手動(dòng)指定密碼嗎:

                  Maybe not the invalid Certificate is a Problem, more the SSLv2/3 Handshake; can you try manually specifing a Cipher like this:

                  $stream_opts = array(
                  //      'ssl'=>array('ciphers'=>"3DES" // also working
                  //      further ciphers on http://www.openssl.org/docs/apps/ciphers.html
                          'ssl'=>array('ciphers'=>"SHA1"
                        )
                  );
                  
                  $myStreamContext = stream_context_create($stream_opts);
                  $soapOptions['stream_context'] = $stream_opts;
                  $soapClient = new SoapAuthClient("https://...", $soapOptions);
                  

                  祝你好運(yùn)!

                  這篇關(guān)于Php SoapClient stream_context 選項(xiàng)的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                  【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!

                  相關(guān)文檔推薦

                  enable SOAP on PHP(在 PHP 上啟用 SOAP)
                  Get received XML from PHP SOAP Server(從 PHP SOAP 服務(wù)器獲取接收到的 XML)
                  not a valid AllXsd value(不是有效的 AllXsd 值)
                  PHP SoapClient: SoapFault exception Could not connect to host(PHP SoapClient:SoapFault 異常無法連接到主機(jī))
                  Implementation of P_SHA1 algorithm in PHP(PHP中P_SHA1算法的實(shí)現(xiàn))
                  Sending a byte array from PHP to WCF(將字節(jié)數(shù)組從 PHP 發(fā)送到 WCF)

                • <small id='tRPHj'></small><noframes id='tRPHj'>

                  <legend id='tRPHj'><style id='tRPHj'><dir id='tRPHj'><q id='tRPHj'></q></dir></style></legend>
                  <i id='tRPHj'><tr id='tRPHj'><dt id='tRPHj'><q id='tRPHj'><span id='tRPHj'><b id='tRPHj'><form id='tRPHj'><ins id='tRPHj'></ins><ul id='tRPHj'></ul><sub id='tRPHj'></sub></form><legend id='tRPHj'></legend><bdo id='tRPHj'><pre id='tRPHj'><center id='tRPHj'></center></pre></bdo></b><th id='tRPHj'></th></span></q></dt></tr></i><div class="jtff5vd" id='tRPHj'><tfoot id='tRPHj'></tfoot><dl id='tRPHj'><fieldset id='tRPHj'></fieldset></dl></div>
                    <bdo id='tRPHj'></bdo><ul id='tRPHj'></ul>

                        <tbody id='tRPHj'></tbody>

                          • <tfoot id='tRPHj'></tfoot>
                          • 主站蜘蛛池模板: 旋振筛|圆形摇摆筛|直线振动筛|滚筒筛|压榨机|河南天众机械设备有限公司 | 999范文网_优质范文下载写作帮手 | 丝印油墨_水性油墨_环保油墨油漆厂家_37国际化工 | 神超官网_焊接圆锯片_高速钢锯片_硬质合金锯片_浙江神超锯业制造有限公司 | 碳纤维复合材料制品生产定制工厂订制厂家-凯夫拉凯芙拉碳纤维手机壳套-碳纤维雪茄盒外壳套-深圳市润大世纪新材料科技有限公司 | 蒜肠网-动漫,二次元,COSPLAY,漫展以及收藏型模型,手办,玩具的新媒体.(原变形金刚变迷TF圈) | 铸铁平台,大理石平台专业生产厂家_河北-北重机械 | 环压强度试验机-拉链拉力试验机-上海倾技仪器仪表科技有限公司 | 专业广州网站建设,微信小程序开发,一物一码和NFC应用开发、物联网、外贸商城、定制系统和APP开发【致茂网络】 | 高铝轻质保温砖_刚玉莫来石砖厂家_轻质耐火砖价格 | 集装箱展厅-住人集装箱住宿|建筑|房屋|集装箱售楼处-山东锐嘉科技工程有限公司 | 全自动面膜机_面膜折叠机价格_面膜灌装机定制_高速折棉机厂家-深圳市益豪科技有限公司 | 大流量卧式砂磨机_强力分散机_双行星双动力混合机_同心双轴搅拌机-莱州市龙跃化工机械有限公司 | 今日娱乐圈——影视剧集_八卦娱乐_明星八卦_最新娱乐八卦新闻 | 亚克隆,RNAi干扰检测,miRNA定量检测-上海基屹生物科技有限公司 | 盘古网络技术有限公司| 中高频感应加热设备|高频淬火设备|超音频感应加热电源|不锈钢管光亮退火机|真空管烤消设备 - 郑州蓝硕工业炉设备有限公司 | 非标压力容器_碳钢储罐_不锈钢_搪玻璃反应釜厂家-山东首丰智能环保装备有限公司 | 深圳VI设计-画册设计-LOGO设计-包装设计-品牌策划公司-[智睿画册设计公司] | 量子管通环-自清洗过滤器-全自动反冲洗过滤器-沼河浸过滤器 | 光栅尺厂家_数显表维修-苏州泽升精密机械 | 特种电缆厂家-硅橡胶耐高温电缆-耐低温补偿导线-安徽万邦特种电缆有限公司 | 物流公司电话|附近物流公司电话上门取货 | 便民信息网_家电维修,家电清洗,开锁换锁,本地家政公司 | 高铝矾土熟料_细粉_骨料_消失模_铸造用铝矾土_铝酸钙粉—嵩峰厂家 | 沧州友城管业有限公司-内外涂塑钢管-大口径螺旋钢管-涂塑螺旋管-保温钢管生产厂家 | 环球电气之家-中国专业电气电子产品行业服务网站! | 检验科改造施工_DSA手术室净化_导管室装修_成都特殊科室建设厂家_医疗净化工程公司_四川华锐 | 粘度计,数显粘度计,指针旋转粘度计 | 钣金加工厂家-钣金加工-佛山钣金厂-月汇好 | 档案密集架_电动密集架_移动密集架_辽宁档案密集架-盛隆柜业厂家现货批发销售价格公道 | 锥形螺带干燥机(新型耙式干燥机)百科-常州丰能干燥工程 | 密集架|电动密集架|移动密集架|黑龙江档案密集架-大量现货厂家销售 | 福州甲醛检测-福建室内空气检测_环境检测_水质检测-福建中凯检测技术有限公司 | 淘趣英语网 - 在线英语学习,零基础英语学习网站 | 六维力传感器_三维力传感器_二维力传感器-南京神源生智能科技有限公司 | 方源木业官网-四川木门-全国木门专业品牌 | 今日热点_实时热点_奇闻异事_趣闻趣事_灵异事件 - 奇闻事件 | 沈阳楼承板_彩钢板_压型钢板厂家-辽宁中盛绿建钢品股份有限公司 轴承振动测量仪电箱-轴承测振动仪器-测试仪厂家-杭州居易电气 | 酶联免疫分析仪-多管旋涡混合仪|混合器-莱普特科学仪器(北京)有限公司 | 电动垃圾车,垃圾清运车-江苏速利达机车有限公司 |