PHPackages                             kirillemko/php-ntlm - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. kirillemko/php-ntlm

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

kirillemko/php-ntlm
===================

Library for communicating with Microsoft services using NTLM authentication.

2.0.0(2y ago)0561MITPHPPHP &gt;=7.4

Since Dec 20Pushed 2y agoCompare

[ Source](https://github.com/kirillemko/php-ntlm)[ Packagist](https://packagist.org/packages/kirillemko/php-ntlm)[ RSS](/packages/kirillemko-php-ntlm/feed)WikiDiscussions master Synced today

READMEChangelog (1)DependenciesVersions (2)Used By (1)

PHP NTLM
========

[](#php-ntlm)

The PHP NTLM library (php-ntlm) is intended to provide various methods to aid in communicating with Microsoft services that utilize NTLM authentication from within PHP.

[![Scrutinizer](https://camo.githubusercontent.com/0494f48d1cad33837301a53c30c399e776d05bdbe8fc668136bfc1ca60d17775/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6a616d65736961726d65732f7068702d6e746c6d2e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/jamesiarmes/php-ntlm)[![Total Downloads](https://camo.githubusercontent.com/928c739059492438353ccc4c05fc0e0ec9c70002dd89e3006ac3a2e704249a7d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6a616d65736961726d65732f7068702d6e746c6d2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/jamesiarmes/php-ntlm)

Dependencies
------------

[](#dependencies)

- Composer
- PHP 8.1
- cURL with NTLM support (7.23.0+ recommended)

Installation
------------

[](#installation)

The preferred installation method is via Composer, which will automatically handle autoloading of classes.

```
{
    "require": {
        "jamesiarmes/php-ntlm": "~1.0"
    }
}
```

Usage
-----

[](#usage)

### SoapClient

[](#soapclient)

The `\jamesiarmes\PhpNtlm\SoapClient` class extends PHP's built in `SoapClient`class and can be used in the same manner with a few minor changes.

1. The constructor accepts a required 'user' and 'password' index in the `$options` array.
2. The constructor accepts an optional 'curlopts' index in the `$options` array that can be used to set or override the default curl options.

Basic example:

```
$client = new SoapClient(
    $wsdl,
    array('user' => 'username', 'password' => '12345')
);
```

Example that skips SSL certificate validation:

```
$client = new SoapClient(
    $wsdl,
    array(
        'user' => 'username',
        'password' => '12345',
        'curlopts' => array(CURLOPT_SSL_VERIFYPEER => false),
    )
);
```

#### Available options

[](#available-options)

The basic options available on the constructor can be found at . The trace option is not necessary, as the last request and response methods will always be available. In addition to these options, the following additional options are available:

- user (string, required): The user to authenticate with.
- password (string, required): The password to use when authenticating the user.
- curlopts (array): Array of options to set on the curl handler when making the request. This can be used to override any cURL options with the exception of the following: CURLOPT\_HEADER, CURLOPT\_POST, CURLOPT\_POSTFIELDS.
- strip\_bad\_chars (boolean, default: true): Whether or not to strip invalid characters from the XML response. This can lead to content being returned differently than it actually is on the host service, but can also prevent the "looks like we got no XML document" SoapFault when the response includes invalid characters.
- warn\_on\_bad\_chars (boolean, default: false): Trigger a warning if bad characters are stripped. This has no affect unless strip\_bad\_chars is true.

Projects that use php-ntlm
--------------------------

[](#projects-that-use-php-ntlm)

The following is a list of known projects that use this library. If you would like to add your project to the list, please open a pull request to update this document.

- [php-ews](https://github.com/jamesiarmes/php-ews)

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 74.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

925d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/eed5ea0d1633eceef18c38b3b86451a0856c8853df57a3872ff56afc971320f5?d=identicon)[kirillemko](/maintainers/kirillemko)

---

Top Contributors

[![jamesiarmes](https://avatars.githubusercontent.com/u/1030345?v=4)](https://github.com/jamesiarmes "jamesiarmes (20 commits)")[![kirillemko](https://avatars.githubusercontent.com/u/7727765?v=4)](https://github.com/kirillemko "kirillemko (2 commits)")[![Dwarfex](https://avatars.githubusercontent.com/u/721721?v=4)](https://github.com/Dwarfex "Dwarfex (1 commits)")[![benyanke](https://avatars.githubusercontent.com/u/4274911?v=4)](https://github.com/benyanke "benyanke (1 commits)")[![pavog](https://avatars.githubusercontent.com/u/4786628?v=4)](https://github.com/pavog "pavog (1 commits)")[![rubenrubiob](https://avatars.githubusercontent.com/u/9865569?v=4)](https://github.com/rubenrubiob "rubenrubiob (1 commits)")[![satalaondrej](https://avatars.githubusercontent.com/u/40560686?v=4)](https://github.com/satalaondrej "satalaondrej (1 commits)")

### Embed Badge

![Health badge](/badges/kirillemko-php-ntlm/health.svg)

```
[![Health](https://phpackages.com/badges/kirillemko-php-ntlm/health.svg)](https://phpackages.com/packages/kirillemko-php-ntlm)
```

###  Alternatives

[kartik-v/yii2-password

Useful password strength validation utilities for Yii Framework 2.0

761.3M17](/packages/kartik-v-yii2-password)[vitalybaev/laravel5-dkim

Laravel 5/6 package for signing outgoing messages with DKIM.

3163.1k](/packages/vitalybaev-laravel5-dkim)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
