alxjzx100 / turbosmsua
此包的最新版本(1.0.9)没有提供许可证信息。
1.0.9
2023-02-10 20:37 UTC
Requires
- php: >=7.1
README
这是什么?
此库实现了turbosms.ua服务的HTTP API。
🛠安装
安装Composer (https://getcomposer.org.cn/download/)
通过Composer作为库
composer require alxjzx100/turbosmsua
🔌 使用
<?php require 'vendor/autoload.php'; use alxjzx100\TurboSmsUA\httpApi; $httpApi = new httpApi('YOUR_API_KEY'); $httpApi->send('380661234567', 'SMS text');
###高级示例
<?php require 'vendor/autoload.php'; use alxjzx100\TurboSmsUA\httpApi; $numbers = [ '380661234567', '380671234567' ]; $smsApi = new httpApi('YOUR_API_KEY'); try { $smsApi ->setConnectionType('curl') ->setMode('hybrid') ->setStartTime( new DateTime('22.02.2022 18:00') ) ->setTTL('48000') ->setAction('Some Action') ->setImage('https://image.url') ->send($numbers,'TEXT TO SEND', 'SMS SENDER NAME', 'VIBER SENDER NAME'); }catch (Exception $e){ echo $e->getMessage(); }
方法
- send
- setConnectionType
- setMode
- setStartTime
- setIsFlash
- setTTL
- setImage
- setCaption
- setAction
- setFileId
- countClicks
- isTransactional
- getBalance
- getFileDetails
- uploadFile