cronario/messenger-alphasms
最新稳定版本:0.1.9
Composer 安装命令:
composer require cronario/messenger-alphasms
包简介
Send sms Messages
关键字:
README 文档
README
This package provides packagist access to php api for alphasms provider.
Usage
<?php require_once('./vendor/autoload.php'); //init class with your login/password $sms = new SMSclient('qwerty', 'qwerty', 'API_KEY'); /* sendSMS(from (phone, name),to phone, message, timestamp when to send sms, wap-push link, flash flag (bool)); */ //send on SMS and receive it's id for tracking //message in UTF-8 $id = $sms->sendSMS('AlphaSMS', '380931234567', 'Текст сообщения на русском языка в UTF-8 любой длинны'); //send WAP-PUSH message //$id = $sms->sendSMS('Alpha Name','0931234567', 'Самый классный сайт!', time(), 'http://alphasms.com.ua/'); //send flash message at certain time //$id = $sms->sendSMS('80501234567','80931234567', 'Flash message in english letters only!', strtotime('+1 minute'), '', 1); //just for usage - text can be translierated to use less symbols in sms //echo SMSclient::translit('Текст сообщения на русском языка в UTF-8 любой длинны'); //if no ID - then message is not sent and you should check errors if($sms->hasErrors()) die(var_dump($sms->getErrors())); else var_dump($id); //doing something interesting... sleep(20); //track message status after about 0,5 minute. $res = $sms->receiveSMS($id); var_dump($res); var_dump($sms->getResponse());//full data //get amount of money in account var_dump($sms->getBalance());
统计信息
- 总下载量: 5.78k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-09-30