6 December 2016

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
  1. require_once dirname(__FILE__) . '/vendor/autoload.php';
  3. $SOAP = new \NTLMSoap\Client('WSDL_URL', array(
  4. 'ntlm_username' => 'USERNAME',
  5. 'ntlm_password' => 'PASSWORD',
  6. ));
  7. $Response = $SOAP->__getTypes();
  8. var_dump($Response);
Programming Language: PHP