NTLM authentication is often used for SOAP requests, especially when connecting to Microsoft services. The PHP SoapClient does not support NTLM out of the box, so you will need to use a third-party library like "tftdias NTLMSoap" to add the necessary functionality. This library extends the SoapClient class with NTLM support, allowing you to make SOAP requests with NTLM authentication. You will need to provide your NTLM credentials (username and password) when creating the SoapClient object.
Source code viewer
- require_once dirname(__FILE__) . '/vendor/autoload.php';
- $SOAP = new \NTLMSoap\Client('WSDL_URL', array(
- 'ntlm_username' => 'USERNAME',
- 'ntlm_password' => 'PASSWORD',
- $Response = $SOAP->__getTypes();
- var_dump($Response);Programming Language: PHP