您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息
免费发信息
三六零分类信息网 > 牡丹江分类信息网,免费分类信息发布

thinphp做发送短信功能?

2024/3/8 3:44:04发布27次查看
用thinphp来做一个短信发送功能?短信发送接口是阿里大于的接口!
程序是
$appkey = 2344130587; $secret = 8d91dcf2073ff6da30bddbc; require think_path.'library/org/taobao/top/topclient.php'; require think_path.'library/org/taobao/top/resultset.php'; require think_path.'library/org/taobao/top/requestcheckutil.php'; require think_path.'library/org/taobao/top/toplogger.php'; require think_path.'library/org/taobao/top/request/alibabaaliqinfcsmsnumsendrequest.php'; include(think_path.'library/org/taobao/topsdk.php'); $c = new \topclient; $c->format = json; $c->appkey = $appkey; $c->secretkey = $secret; $req = new \alibabaaliqinfcsmsnumsendrequest; //$req->setextend(123456); $req->setsmstype(normal); $req->setsmsfreesignname(短信测试); $req->setsmsparam('{code:123456}'); $req->setrecnum(159143333346); $req->setsmstemplatecode(sms_8525079); $resp = $c->execute($req); dump($resp); 打印出来是object(resultset)#8 (2) {[code] => int(0) [msg] => string(28) could not resolve proxy: ddd}请教一下各位大神哪里错了?

回复内容: 用thinphp来做一个短信发送功能?短信发送接口是阿里大于的接口!
程序是
$appkey = 2344130587; $secret = 8d91dcf2073ff6da30bddbc; require think_path.'library/org/taobao/top/topclient.php'; require think_path.'library/org/taobao/top/resultset.php'; require think_path.'library/org/taobao/top/requestcheckutil.php'; require think_path.'library/org/taobao/top/toplogger.php'; require think_path.'library/org/taobao/top/request/alibabaaliqinfcsmsnumsendrequest.php'; include(think_path.'library/org/taobao/topsdk.php'); $c = new \topclient; $c->format = json; $c->appkey = $appkey; $c->secretkey = $secret; $req = new \alibabaaliqinfcsmsnumsendrequest; //$req->setextend(123456); $req->setsmstype(normal); $req->setsmsfreesignname(短信测试); $req->setsmsparam('{code:123456}'); $req->setrecnum(159143333346); $req->setsmstemplatecode(sms_8525079); $resp = $c->execute($req); dump($resp); 打印出来是object(resultset)#8 (2) {[code] => int(0) [msg] => string(28) could not resolve proxy: ddd}请教一下各位大神哪里错了?

看提示信息是无法解析代理:ddd。不用tp,直接用官网提供的demo能发吗?
$appkey = 2344130587;$secret = 8d91dcf2073ff6da30bddbc;
牡丹江分类信息网,免费分类信息发布

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录