PHP code example of mrd / ypsms-php-sdk
1. Go to this page and download the library: Download mrd/ypsms-php-sdk library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
mrd / ypsms-php-sdk example snippets
use \Yunpian\Sdk\YunpianClient;
//初始化client,apikey作为所有请求的默认值
$clnt = YunpianClient::create($apikey);
$param = [YunpianClient::MOBILE => '18616020000',YunpianClient::TEXT => '【云片网】您的验证码是1234'];
$r = $clnt->sms()->single_send($param);
//var_dump($r);
if($r->isSucc()){
//$r->data()
}
json
" "yunpian/yunpian-php-sdk" : "~1.0"
}