awd-studio/smsc
Composer 安装命令:
composer require awd-studio/smsc
包简介
An API for sending messages with the https://smsc.ua / https://smsc.ru / https://smsc.kz / https://smsc.tj / https://smscentre.com services.
README 文档
README
SMSC
Simple library for sending SMS and other messages
An API for sending short messages with the SMSC services.
Supported gateways:
Installing
SMSC library can be installed directly from Composer.
composer require awd-studio/smsc
How to use:
Send messages
<?php use Smsc\Settings\Settings; use Smsc\Services\SmscMessage; // Create new settings item $settings = new Settings([ 'login' => $MY_LOGIN, 'psw' => $MY_PASSWORD ]); // Create new message $options = [ 'translit' => true, // Set transliteration ]; $sms = new SmscMessage($settings, $phones, $message, $options); // Send SMS $sms->send(); // Get response data $response = $smsc->getData()->getResponse(); // Or get processed results $response = $smsc->results();
Check balance
<?php use Smsc\Settings\Settings; use Smsc\Services\SmscBalance; // Create new settings item $settings = new Settings([ 'login' => $MY_LOGIN, 'psw' => $MY_PASSWORD ]); // Create new balance $balance = new SmscBalance($settings); // Send request $balance->send();
Get Sender-IDs
<?php use Smsc\Settings\Settings; use Smsc\Services\SmscSenders; // Create new settings item $settings = new Settings([ 'login' => $MY_LOGIN, 'psw' => $MY_PASSWORD ]); // Create new balance $senders = new SmscSenders($settings); $senders->getSenders(); // Send request $senders->send(); // Manage Sender IDs $arr = $senders->results();
More examples
<?php use Smsc\Settings\Settings; use Smsc\Services\SmscMessage; // Create new settings item $settings = new Settings([ 'login' => $MY_LOGIN, 'psw' => $MY_PASSWORD ]); $sms = new SmscMessage($settings, $phones, $message, $options); // Send MMS $sms->mms($theme = 'My message theme'); $sms->send(); // Send E-mail $sms->email($theme = 'My message theme'); $sms->send(); // Send Viber $sms->viber(); $sms->send(); // Send HLR $sms->hlr(); $sms->send(); // Send Flash-SMS $sms->flash(); $sms->send(); // Send Ping-SMS $sms->ping(); $sms->send(); // Voice message $sms->call('w3'); // Voice call with women alternative voice #2. $sms->send(); // Set additional options $options = [ 'id' => 123, // Set SMS ID 'time' => $timestamp, // Set SMS sending time 'valid' => 10, // Set SMS live time for 100 hours 'tinyurl' => true, // Automate short URL's ]; $sms = new SmscMessage($settings, $phones, $message, $options); $sms->send();
More information here.
awd-studio/smsc 适用场景与选型建议
awd-studio/smsc 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.28k 次下载、GitHub Stars 达 1, 最近一次更新时间为 2017 年 08 月 20 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「api」 「sms」 「smsc」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 awd-studio/smsc 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 awd-studio/smsc 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 awd-studio/smsc 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Класс для работы с API сервиса smsc.ru
A PHP wrapper for SMSC API
Yii2 smsc.ru extension
Yii2 smsc extension
Symfony smsc.ru Notifier Bridge
A PSR-7 compatible library for making CRUD API endpoints
统计信息
- 总下载量: 1.28k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-08-20