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

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

mishanki/php-ntlm
=================

Library for communicating with Microsoft services using NTLM authentication.

v1.0.3(5mo ago)12031MITPHPPHP &gt;=8.5

Since Nov 21Pushed 5mo agoCompare

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

READMEChangelog (3)DependenciesVersions (4)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

40

—

FairBetter than 88% of packages

Maintenance70

Regular maintenance activity

Popularity13

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 69% 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 ~0 days

Total

3

Last Release

171d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5513299b5470b3e7c5f0582ce7a7f941528a3ad48321429e375f1645d28a389e?d=identicon)[Mishanki](/maintainers/Mishanki)

---

Top Contributors

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

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

###  Alternatives

[namshi/jose

JSON Object Signing and Encryption library for PHP.

1.8k99.6M101](/packages/namshi-jose)[league/oauth1-client

OAuth 1.0 Client Library

99698.8M106](/packages/league-oauth1-client)[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)[league/oauth2-google

Google OAuth 2.0 Client Provider for The PHP League OAuth2-Client

41721.2M118](/packages/league-oauth2-google)[illuminate/auth

The Illuminate Auth package.

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

PHPackages © 2026

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