PHP code example of blackhilloldmonster / aliyun_sms_php

1. Go to this page and download the library: Download blackhilloldmonster/aliyun_sms_php 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/ */

    

blackhilloldmonster / aliyun_sms_php example snippets


composer 

use BHOM\SMS\AliyunSMS;
.....
.....
.....
$accessKeyId = "";
$accessKeySecret = "";
$region = "";
$endPointName = "";
$phonNumber = "13900000000";
$tpcode = "SMS_177777";
$tpparam = ["code"=>"992929"];
$sign = "签名";
$sms = new AliyunSMS($accessKeyId, $accessKeySecret,$region,$endPointName);
$status = $sms->send($phonNumber,$tpcode,$tpparam,$sign);