定制 checkhim/php 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

checkhim/php

Composer 安装命令:

composer require checkhim/php

包简介

SDK for integrating with the CheckHim API to verify active phone numbers.

README 文档

README

Latest Stable Version Packagist: checkhim/php

Official SDK for integrating with the CheckHim API (https://checkhim.tech) to verify if a phone number is active.

Installation

Via Composer:

composer require checkhim/php

Basic Usage

require 'vendor/autoload.php';

use CheckHim\CheckHim;

$client = new CheckHim('ch_test_your_api_key');

try {
    $r = $client->verify('+5511984339000');
    echo "Valid: " . ($r['valid'] ? 'yes' : 'no') . " Carrier: " . $r['carrier'] . PHP_EOL;
} catch (Exception $e) {
    echo "Error: {$e->getMessage()}" . PHP_EOL;
}

Response Example

{
  "carrier": "TIM",
  "valid": true
}

If the API returns an error, the response will be:

{
  "error": "verification failed: Network is forbidden (code: 6)",
  "code": "REJECTED_NETWORK",
  "http_status": 400
}

Documentation

Contributing

Contributions are welcome! To contribute:

  1. Fork this repository and create your branch from main.
  2. Install dependencies with composer install.
  3. Write clear, tested code and add/adjust tests in the tests/ directory.
  4. Run tests locally with:
    php vendor/bin/phpunit --testdox
    
  5. Open a Pull Request with a clear description of your changes.

For bug reports or feature requests, please open an issue.

License

MIT

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-09-15