PHP code example of ofcold / luminous-sms

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

    

ofcold / luminous-sms example snippets


use Ofcold\LuminousSMS\LuminousSMS;
use Ofcold\LuminousSMS\Helpers;
use Ofcold\LuminousSMS\Contracts\MessageInterface;

$sms = new LuminousSMS(unction($messager) {
	$messager
		->setMobilePhone('18898726543')
		->setType(Ofcold\LuminousSMS\Contracts\MessageInterface::VOICE_MESSAGE)
		->setContent('您的验证码是{code}, 验证码将在2分钟后失效!请及时使用。')
		->setPaserData(['code'	=> rand(1000, 9999)]);
});

var_dump($result);

//	------------------------------------------------------------------------------------------------

//	Signature manager
//	Add
//$resuts = $sms->createHandler('qcloud')->getSignature('add', '衣衣布舍');
//
// Query
//$resuts = $sms->createHandler('qcloud')->getSignature('query', [15858, 15859]);
//
//	Edit
$resuts = $sms->createHandler('qcloud')->getSignature('edit', '150986', '你是哪里来');

var_dump($resuts);