PHP code example of ouarea / chuanglan-sms

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

    

ouarea / chuanglan-sms example snippets


use Ouarea\Sms\Chuanglan\Service as ChuanglanSmsService;

$service = new ChuanglanSmsService('account', 'password');
// - or the full version
// $service = new ChuanglanSmsService('account', 'password', $optionsOfService, $instanceOfClient);

// send message
$service->send('message', $subscriber, $optionsOfMessage);
// query quota
$quota = $service->queryQuota();