PHP code example of sebudesign / php-ntlm-soap

1. Go to this page and download the library: Download sebudesign/php-ntlm-soap library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

sebudesign / php-ntlm-soap example snippets


 namespace App\Services;

use SeBuDesign\NtlmSoap\Client;

class PetsService
{
    public function getPetTypes()
    {
        $client = new Client(
            'http://my.pets.com/WS_Pet_types', // Endpoint of the call
            'PetService\Username', // NTLM username
            'pa55w0rd' // NTLM password
        );
        
        $response = $client->ReadMultiple(['filter' => null]); // Call the ReadMultiple Soap call with filter parameter
        
        var_dump($response); // All pet types
        die();
    }
}