1. Go to this page and download the library: Download dovechen/yii2-ihuyi 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/ */
// Send normal sms.
$sendResult = Yii::$app->ihuyi->sendSms('15395090543', 'Your code is 1123.');
// Get normal sms.
$smsNumInfo = Yii::$app->ihuyi->getSmsNum();
// Add normal sms template.
$smsTemplateInfo = Yii::$app->ihuyi->addSmsTemplate('Your code is【变量】');
// Send international sms.
$sendResult = Yii::$app->ihuyi->sendInternational('+86 15395090543', 'Your code is 1123.');
// Get international sms.
$internationalNumInfo = Yii::$app->ihuyi->getInternationalNum();