PHPackages                             jamesiarmes/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. jamesiarmes/php-ntlm

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

jamesiarmes/php-ntlm
====================

Library for communicating with Microsoft services using NTLM authentication.

1.0.0(8y ago)562.8M—8.8%27[6 issues](https://github.com/jamesiarmes/php-ntlm/issues)[3 PRs](https://github.com/jamesiarmes/php-ntlm/pulls)4MITPHPPHP &gt;=5.3.9

Since Dec 30Pushed 2y ago1 watchersCompare

[ Source](https://github.com/jamesiarmes/php-ntlm)[ Packagist](https://packagist.org/packages/jamesiarmes/php-ntlm)[ RSS](/packages/jamesiarmes-php-ntlm/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)DependenciesVersions (3)Used By (4)

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

43

—

FairBetter than 91% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity56

Moderate usage in the ecosystem

Community24

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 80% 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

Every ~277 days

Total

2

Last Release

3149d ago

### Community

Maintainers

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

---

Top Contributors

[![jamesiarmes](https://avatars.githubusercontent.com/u/1030345?v=4)](https://github.com/jamesiarmes "jamesiarmes (20 commits)")[![benyanke](https://avatars.githubusercontent.com/u/4274911?v=4)](https://github.com/benyanke "benyanke (1 commits)")[![Dwarfex](https://avatars.githubusercontent.com/u/721721?v=4)](https://github.com/Dwarfex "Dwarfex (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/jamesiarmes-php-ntlm/health.svg)

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

###  Alternatives

[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[gesdinet/jwt-refresh-token-bundle

Implements a refresh token system over Json Web Tokens in Symfony

70516.4M35](/packages/gesdinet-jwt-refresh-token-bundle)[illuminate/auth

The Illuminate Auth package.

9327.3M1.0k](/packages/illuminate-auth)[beatswitch/lock

A flexible, driver based Acl package for PHP 5.4+

870304.7k2](/packages/beatswitch-lock)[amocrm/amocrm-api-library

amoCRM API Client

182728.5k6](/packages/amocrm-amocrm-api-library)[vonage/jwt

A standalone package for creating JWTs for Vonage APIs

424.1M4](/packages/vonage-jwt)

PHPackages © 2026

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