PHP code example of aragorn-yang / aliyun-sms-php

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

    

aragorn-yang / aliyun-sms-php example snippets


$aliSms = new AliyunSms();
$response = $aliSms->sendSms('phone_number', 'sign_name', 'template_code', ['name'=> 'value in your template']);
$response = $aliSms->querySendDetails('phone_number', '20180911', 10, 1);