wtwei/aliyun-sms-php

阿里云 SMS forked from HyanCat/aliyun-sms-php

v0.2.5 2017-07-05 06:00 UTC

README

阿里云短信服务 for PHP.

Installation

composer require wtwei/aliyun-sms-php

Usage

In a general way

$sms = new \Wtwei\AliyunSMS\SmsService('[TEST_APP_ID]', '[TEST_APP_KEY]');

// 设置参数
$sms->setTemplate('[TEMPLATE_NAME]');
$sms->setParams(['code' => '我是验证码', 'product' => '我是产品']);
$sms->setSignName('我是签名');

// 发送短信
$sms->send('[PHONE_NUMBER]');

License

The source code is under MIT License.