sayue/alidayu-php-sdk

Alibaba Dayu php-sdk

v1.1.0 2017-11-07 08:54 UTC

This package is not auto-updated.

Last update: 2025-06-19 12:17:42 UTC


README

阿里大于php-sdk

安装

composer require sayue/alidayu-sdk

使用方法

发送短信

use Alibaba\taobao\top\TopClient;
use Alibaba\taobao\top\request\AlibabaAliqinFcSmsNumSendRequest;

$c = new TopClient();
$c->appkey = $appkey;
$c->secretKey = $secretKey;

$mobile = 'xxx';    //手机号码
$code = 'xxx'       //短信内容

$req = new AlibabaAliqinFcSmsNumSendRequest();
$req->setSmsType("xxx");
$req->setSmsFreeSignName("xxx");

$req->setSmsParam("{\"code\":\"$code\"}");
$req->setRecNum($mobile);
$req->setSmsTemplateCode("xxx");

$resp = $this->c->execute($req);
return $resp;