smsbox/php-sdk 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

smsbox/php-sdk

最新稳定版本:v1.1.0

Composer 安装命令:

composer require smsbox/php-sdk

包简介

Send SMS message and more from your application with the SMSBOX PHP SDK

README 文档

README

PHP Lint & Tests License: MIT

The SMSBOX logo

The SMSBOX PHP SDK provides a simple and efficient way to send SMS messages directly from your PHP applications.
Whether you are sending alerts, notifications, or marketing messages, this SDK makes the process fast and easy to integrate.

For more information, visit the official website: SMSBOX

⚠️ Requirements

  • PHP 7.4+ (compatible with PHP 8.x)
  • Composer

📖 Documentation

For detailed information about the SMSBOX Sending SMS API parameters, see the official documentation: SMS API.

✉️ Features

  • Send SMS messages quickly and reliably, customizable sender ID, scheduling, etc.

⚙️ Installation

Install via Composer:

composer require smsbox/php-sdk

⚡ Quick Start

<?php

require __DIR__ . '/vendor/autoload.php';

use Smsbox\SmsboxClient;
use Smsbox\Options\SMS\SmsOptions;
use Smsbox\Messages\SmsMessage;
use Smsbox\Enum\SMS\Strategy;

try {
    $client = new SmsboxClient(SMSBOX_API_KEY);

    $message = new SmsMessage(
        ['+336XXXXXXXX'],
        'Hello! This is a test message.'
    );

    $options = (new SmsOptions());
    ->strategy(Strategy::MARKETING);

    $message->options($options);

    $response = $client->sendSms($message);
    echo 'Message sent successfully. Reference ID: ' . $response['refId'] . PHP_EOL;

} catch (GuzzleException|SmsboxException $e) {
    echo 'Error sending OTP: ' . $e->getMessage() . PHP_EOL . 'Code: ' . $e->getCode();
}

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-10-06