PHP code example of ender / yunpian-sms

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

    

ender / yunpian-sms example snippets


use Ender\YunPianSms\SMS\YunPianSms;
$yunpianSms=new YunPianSms('xxxxxxxxxxxxxxxxxx');
$response=$yunpianSms->sendMsg('18xxxxxxx51','【云片网】您的验证码是1234');

use Ender\YunPianSms\SMS\YunPianUser;
$yunpianSms=new YunPianUser('xxxxxxxxxxxxxxxx');
$response=$yunpianSms->getAccountInfo();
 php
array (
  'status' => 200,
  'data' =>
  array (
    'code' => 0,
    'msg' => 'OK',
    'result' =>
    array (
      'count' => 1,
      'fee' => 1,
      'sid' => 1956790935,
    ),
  ),
)