承接 taliffsss/unisms 相关项目开发

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

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

taliffsss/unisms

Composer 安装命令:

composer require taliffsss/unisms

包简介

PHP client library for the UniSMS API (https://unismsapi.com)

README 文档

README

PHP client library for the UniSMS API — a powerful, reliable, and developer-friendly SMS API for the Philippines, supporting all major carriers (Globe, Smart, DITO, Sun, TNT).

Requirements

  • PHP 8.0 or higher
  • ext-curl
  • ext-json

Installation

composer require taliffsss/unisms

Usage

Sending an SMS

use Taliffsss\UniSms\UniSms;

$uniSms = new UniSms('your-secret-key');

$response = $uniSms->to('+639171234567')
    ->message('Hello world')
    ->from('MyBrand') // optional, defaults to "UniSMS"
    ->withMetadata(['order_id' => 12345]) // optional, echoed back by the API
    ->send();

// $response['message']['reference_id'], $response['message']['status'], ...

Checking a message's status

$status = $uniSms->get('msg_84e8b93b-6315-46af-a686');

Error handling

use Taliffsss\UniSms\Exceptions\ApiException;
use Taliffsss\UniSms\Exceptions\TransportException;
use Taliffsss\UniSms\Exceptions\UniSmsException;

try {
    $uniSms->to('639171234567')->message('Hello world')->send();
} catch (ApiException $e) {
    // The API reached but returned a non-2xx response.
    $e->getStatusCode();
    $e->getResponseBody();
} catch (TransportException $e) {
    // The request could not be completed (network/timeout/etc.).
} catch (UniSmsException $e) {
    // Any other client-side validation error (e.g. missing recipient).
}

Testing

composer install
composer test

License

The MIT License (MIT). See LICENSE for details.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-07-02

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固