承接 renderbit-technologies/indos-checker-api 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

renderbit-technologies/indos-checker-api

Composer 安装命令:

composer require renderbit-technologies/indos-checker-api

包简介

Check seafarer details from Indos number

README 文档

README

Tests Latest Stable Version PHP Version License: MIT

A PHP library to check seafarer details from INDOS numbers as issued by the Directorate General of Shipping, Mumbai, India. Queries the DGS eSamudra server and returns validated INDOS records.

Requirements

Dependencies

Package Purpose
guzzlehttp/guzzle ^7.4 HTTP client for API requests
symfony/dom-crawler ^6.0 HTML response parsing
symfony/css-selector ^6.0 CSS selector support for DomCrawler

Installation

composer require renderbit-technologies/indos-checker-api

Usage

Check if an INDOS number is valid

use RenderbitTechnologies\IndosCheckerApi\IndosChecker;

$checker = new IndosChecker();
$checker->checkValid('05LL0262', '14/08/1963');
// true

Retrieve seafarer details

$data = $checker->getData('05LL0262', '14/08/1963');
// [
//     "Name"                => "YADAV SANJEEV",
//     "Date of Birth"       => "14-AUG-1963",
//     "INDoS No."           => "05LL0262",
//     "Passport No."        => "M2069200",
//     "Passport Issue Date" => "15-SEP-2014",
//     "Passport Valid To"   => "14-SEP-2024",
//     "CDC No."             => "MUM 133201",
//     "CDC Issue Date"      => "22-MAY-2015",
//     "CDC Valid To"        => "21-MAY-2025",
//     "CDC Issue Place"     => "Mumbai",
// ]

The returned array contains up to 10 fields: Name, Date of Birth, INDoS No., Passport No., Passport Issue Date, Passport Valid To, CDC No., CDC Issue Date, CDC Valid To, and CDC Issue Place. An empty array is returned when no record is found.

Exception handling

use RenderbitTechnologies\IndosCheckerApi\IndosCheckerException;

try {
    $data = $checker->getData($no, $dob);
} catch (IndosCheckerException $e) {
    // Network or server error — inspect $e->getPrevious() for the Guzzle cause
} catch (\InvalidArgumentException $e) {
    // Bad input: empty INDOS number or wrong date format (must be DD/MM/YYYY)
}
  • IndosCheckerException wraps all Guzzle/HTTP errors (timeouts, connection failures, server errors).
  • \InvalidArgumentException is thrown for invalid input: empty or whitespace-only INDOS numbers, or DOB not in DD/MM/YYYY format.

Custom HTTP client

Pass a configured GuzzleHttp\Client to override timeouts, proxies, etc.:

$client  = new \GuzzleHttp\Client(['timeout' => 5.0]);
$checker = new IndosChecker($client);

Custom endpoint

Override the default DGS eSamudra endpoint (useful for testing):

$checker = new IndosChecker(null, 'http://staging.example.com/indos');

Project Structure

Indos-Checker-API/
├── src/
│   ├── IndosChecker.php          # Core class: validation, HTTP request, HTML parsing
│   └── IndosCheckerException.php # Custom exception for API/network errors
├── tests/
│   └── IndosCheckerTest.php      # PHPUnit tests (input validation, parsing, exceptions)
├── .github/
│   ├── workflows/tests.yml       # CI: tests on PHP 8.1–8.4
│   └── dependabot.yml            # Automated dependency updates
├── composer.json
├── phpunit.xml
└── LICENSE                       # MIT

Testing

composer install
vendor/bin/phpunit

CI

GitHub Actions runs the PHPUnit suite on every push and pull request to master, across PHP 8.1, 8.2, 8.3, and 8.4.

License

MIT © Renderbit Technologies

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 1
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 4
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-06-26

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固