PHP code example of sn01615 / junengwan
1. Go to this page and download the library: Download sn01615/junengwan 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/ */
sn01615 / junengwan example snippets
use Yunpian\Yumpian;
$text = "【某某有限公司】您的验证码是#code#";
$text = str_replace('#code#', $code, $text);
$apikey = $_SERVER['CONFIGYUNPIAN'];
$sender = new Yunpian();
$sender->setApiKey($apikey);
$sender->setCurlOpt(
[
CURLOPT_CAINFO => __DIR__ . '/../nlibraries/ca-bundle.crt'
]);
$result = $sender->singleSend($mobile, $text);