benja/nida-php
Composer 安装命令:
composer require benja/nida-php
包简介
PHP library to fetch user information from NIDA Tanzania
README 文档
README
Unofficial package for fetching users information based on National ID Number
Created by Benjamini
⚠️ 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
- PHP >= 7.4
- Composer
- Guzzle HTTP client (installed automatically via Composer)
- Optional: IDE/editor for PHP development (VSCode, PhpStorm, Sublime, etc.)
📦 Installation
composer require benja/nida-php
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
<?php require 'vendor/autoload.php'; use Nida\Nida; $nida = new Nida(); $user = $nida->loadUser("1999999999999999"); // Replace with valid Tanzanian ID print_r($user); Raw JSON Data $userRaw = $nida->loadUser("1999999999999999", true); print_r($userRaw);
🖼 Photo & 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
If this package is useful, give it a ⭐ on GitHub to help others discover it.
📝 Contributions
Fork the repo, make improvements, and submit a pull request.
⚠️ Disclaimer
This is unofficial. The author is not responsible for incorrect data, API changes, or misuse. Use at your own discretion.
📌 Credits
Created by Benjamini
Inspired by Kalebu / Python NIDA library
benja/nida-php 适用场景与选型建议
benja/nida-php 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 7 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 09 月 21 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 benja/nida-php 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 benja/nida-php 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 7
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 23
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-09-21