viernes, 12 de julio de 2019

Deshabilitar verificación de certificado en PHP SoapClient

Forzar la conexión a un Servidor con un Certificado no valido o de pruebas.

   $opts = [
        'ssl' => [
            // set some SSL/TLS specific options
            'verify_peer' => false,
            'verify_peer_name' => false,
            'allow_self_signed' => true,
        ],
         'http'=>[
            'user_agent' => 'PHPSoapClient'
        ]
    ];
//   Echo 'Prueba de avance 4<br>';
   $soapClient = new SoapClient("https://test.com:555/ol-ad-itseida-ws/ReceptorService.htm?wsdl", array('trace'=>true,'stream_context' => stream_context_create($opts)));

Continúa...