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(7mo ago)05MITPHPPHP &gt;=7.4

Since Sep 22Pushed 7mo 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 1mo ago

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

28

—

LowBetter than 54% of packages

Maintenance62

Regular maintenance activity

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity35

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

239d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8f3400fc4352cc91459af6ee68041e86fea90ab4fd8c08b505e608396bda6495?d=identicon)[basanzietech](/maintainers/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

[shlinkio/shlink

A self-hosted and PHP-based URL shortener application with CLI and REST interfaces

4.8k4.3k](/packages/shlinkio-shlink)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)[dhlparcel/magento2-plugin

DHL Parcel plugin for Magento 2

11180.5k2](/packages/dhlparcel-magento2-plugin)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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