wulove52/hello-word

阿里云通信(阿里大于)SDK

Installs: 21

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/wulove52/hello-word

1.0 2018-08-24 01:14 UTC

This package is not auto-updated.

Last update: 2026-01-03 14:28:29 UTC


README

环境要求

安装

composer require wulove52/hello-word:dev-master

使用

设置配置

use Wulove52\HelloWord\Alidayu;
Alidayu::setConfig([
   'appKey' => '23356838',
   'appSecret' => '254fee5fbabe2e01be04581d855c9af3',
   // 使用HTTPs
   'secure' => false,

]);

调用API

use Wulove52\HelloWord\Alidayu;
// 发送短信通知
$sms = Alidayu::sms('17191195520', 'SMS_100875117', '潘晓亮', ['number' => '1234']);
// 发送请求并返回响应
$response = $sms->send();

if ($response->success()) {
    // 接口返回成功
    print_r($response->getData());
} else {
    // 接口返回错误
    echo $response->getError();
}