PHPackages                             benja/nida-php - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. benja/nida-php

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

benja/nida-php
==============

PHP library to fetch user information from NIDA Tanzania

v1.0.0(9mo ago)07MITPHPPHP &gt;=7.4

Since Sep 22Pushed 9mo agoCompare

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

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

NIDA PHP Library (Unofficial)
-----------------------------

[](#nida-php-library-unofficial)

[![GitHub Release](https://camo.githubusercontent.com/b71e767ae2d4a1581c929fe903f937ac83ad88565577aabe645c6dcfe0bd8b27/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f626173616e7a6965746563682f6e6964612d7068703f636f6c6f723d626c7565)](https://github.com/basanzietech/nida-php/releases)[![Packagist Version](https://camo.githubusercontent.com/30915895237aea5e7ea8bbd7e3dfd3776ad43ec8a9d50e3a90cea3fd97103ee7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f62656e6a612f6e6964612d706870)](https://packagist.org/packages/benja/nida-php)[![Packagist Downloads](https://camo.githubusercontent.com/72b2b438ebd444536e5e20063af9e5697351c2a7671fb4a148187a0f45635f35/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f62656e6a612f6e6964612d706870)](https://packagist.org/packages/benja/nida-php)[![License: MIT](https://camo.githubusercontent.com/fdf2982b9f5d7489dcf44570e714e3a15fce6253e0cc6b5aa61a075aac2ff71b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e737667)](https://opensource.org/licenses/MIT)

**Unofficial package for fetching users information based on National ID Number**
Created by [Benjamini](https://basanzietech.github.io/benja)

> ⚠️ **Disclaimer:** This is an unofficial package.
> The NIDA API may change without notice, and the author is not responsible for misuse or incorrect data.
> Photo and Signature data may not be available due to NIDA privacy restrictions.

---

🚀 Requirements / Tools
----------------------

[](#-requirements--tools)

- **PHP &gt;= 7.4**
- [Composer](https://getcomposer.org/)
- [Guzzle HTTP client](https://github.com/guzzle/guzzle) (installed automatically via Composer)
- Optional: IDE/editor for PHP development (VSCode, PhpStorm, Sublime, etc.)

---

### 📦 Installation

[](#-installation)

```
composer require benja/nida-php
```

Copy and Testing
----------------

[](#copy-and-testing)

```
cp -r ../nida-php/examples ./examples
```

```
php examples/test.php
```

Local / Development Install

```
git clone https://github.com/basanzietech/nida-php.git
cd nida-php
```

For local testing in another project:

```
{
  "repositories": [
    {
      "type": "path",
      "url": "../nida-php"
    }
  ],
  "require": {
    "benja/nida-php": "*"
  }
}
```

🔑 Usage

```
loadUser("1999999999999999"); // Replace with valid Tanzanian ID
print_r($user);

Raw JSON Data

$userRaw = $nida->loadUser("1999999999999999", true);
print_r($userRaw);
```

🖼 Photo &amp; Signature

Library tries to decode Photo and Signature into PNG images.

⚠️ Due to NIDA privacy policies, actual ID photos are not provided.

For testing, you can use placeholder images:

```
$user['Photo'] = base64_encode(file_get_contents('test-photo.png'));
$user['Signature'] = base64_encode(file_get_contents('test-signature.png'));
```

🔧 Features

Fetch user info from NIDA Tanzania using National ID

Preprocess user data (capitalize keys, decode images if available)

Easy integration with any PHP project via Composer

Return both processed objects and raw JSON

### 🌟 Give it a Star

[](#-give-it-a-star)

If this package is useful, give it a ⭐ on GitHub to help others discover it.

### 📝 Contributions

[](#-contributions)

Fork the repo, make improvements, and submit a pull request.

⚠️ Disclaimer
-------------

[](#️-disclaimer)

This is unofficial. The author is not responsible for incorrect data, API changes, or misuse. Use at your own discretion.

📌 Credits
---------

[](#-credits)

Created by Benjamini

Inspired by Kalebu / Python NIDA library

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance57

Moderate activity, may be stable

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 Bus Factor1

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

285d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/167584894?v=4)[Benjamini Omary](/maintainers/basanzietech)[@basanzietech](https://github.com/basanzietech)

---

Top Contributors

[![basanzietech](https://avatars.githubusercontent.com/u/167584894?v=4)](https://github.com/basanzietech "basanzietech (5 commits)")

### Embed Badge

![Health badge](/badges/benja-nida-php/health.svg)

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

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.3k543.5M2.6k](/packages/aws-aws-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k656.1k38](/packages/neuron-core-neuron-ai)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M47](/packages/tencentcloud-tencentcloud-sdk-php)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

751291.4k43](/packages/civicrm-civicrm-core)[spatie/laravel-export

Create a static site bundle from a Laravel app

674146.0k6](/packages/spatie-laravel-export)[oat-sa/tao-core

TAO core extension

66143.7k122](/packages/oat-sa-tao-core)

PHPackages © 2026

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