方法一:阿里大于API,需要企业账号登录。
alibaba.aliqin.ta.sms.num.send (短信发送)
第一步:注册账号。
第二步:创建短信签名和短信模板。
第三步:创建应用。
第四步:下载SDK。
第五步:调用接口。1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16header("Content-type: text/html; charset=utf-8");
include "TopSdk.php";
include "top/TopClient.php";
date_default_timezone_set('Asia/Shanghai');
$c = new TopClient;
$c->appkey = "23270934";
$c->secretKey = "******";
$req = new AlibabaAliqinFcSmsNumSendRequest;
$req->setExtend("123");
$req->setSmsType("normal");
$req->setSmsFreeSignName("三林镇建设项目");
$req->setSmsParam('{"product":"xiaoming","code":"987"}');
$req->setRecNum("13262208625");
$req->setSmsTemplateCode("SMS_2570065");
$resp = $c->execute($req);
方法二:阿里百川API。
http://baichuan.taobao.com/doc2/detail?spm=0.0.0.0.o6kDjh&treeId=42&articleId=103193&docType=1
taobao.open.sms.sendmsg (发送短信)
1 | header("Content-type: text/html; charset=utf-8"); |