卡拉哈 / hoiio-sms
2.1
2017-10-24 08:53 UTC
Requires
- php: >=5.1.0
This package is not auto-updated.
Last update: 2024-10-01 03:56:30 UTC
README
安装
使用composer安装
composer require "kalahe/hoiio-sms 2.1"
并在config/app.php中添加服务提供者
Kalahe\HoiioSms\HoiioSmsServiceProvider::class,
测试sms
// E.g. Sending SMS
require 'hoiio-php/Services/HoiioService.php';
$h = new HoiioService("myAppID", "myAccessToken");
$txnRef = $h->sms("+651111111", "hello world");
print("SMS sent successfully. TxnRef: $txnRef\n");
// E.g. Building IVR
require 'hoiio-php/Services/HoiioService.php';
$h = new HoiioService("myAppID", "myAccessToken");
$notify = $h->parseIVRNotify($_POST);
$session = $notify->getSession();
$key = $notify->getDigits();
$h->ivrPlay($session, '', "You just pressed $key.");
许可证
此项目受MIT许可证的许可 - 有关详细信息,请参阅MIT许可证。文件
使用
- 文档和详细信息 - 原始Hoiio仓库