PHP code example of zacksleo / phpsms

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

    

zacksleo / phpsms example snippets


Sms::scheme('Ihuyi', [
    '100 backup',
    'agentClass' => 'zacksleo\PhpSms\IhuyiAgent'
]);        

Sms::config([
    'Ihuyi' => [
        'apiKey' => 'apikey',
        'secretKey' => 'secretkey'
    ]
]);
     

$res = Sms::make()->to('手机号码')->content('短信内容')->send(false);