| Server IP : 43.141.49.92 / Your IP : 113.219.202.44 Web Server : Apache System : Linux VM-8-5-opencloudos 6.6.34-9.oc9.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jun 19 19:35:45 CST 2024 x86_64 User : www ( 1000) PHP Version : 8.1.27 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /www/wwwroot/www.ucppt.com/wp-content/plugins/wpcom-member-pro/sdk/qcloudsms/ |
Upload File : |
<?php
defined( 'ABSPATH' ) || exit;
require_once __DIR__ . "/SmsSenderUtil.php";
require_once __DIR__ . "/SmsSingleSender.php";
require_once __DIR__ . "/SmsMultiSender.php";
require_once __DIR__ . "/SmsStatusPuller.php";
require_once __DIR__ . "/SmsMobileStatusPuller.php";
require_once __DIR__ . "/SmsVoicePromptSender.php";
require_once __DIR__ . "/SmsVoiceVerifyCodeSender.php";
require_once __DIR__ . "/VoiceFileUploader.php";
require_once __DIR__ . "/FileVoiceSender.php";
require_once __DIR__ . "/TtsVoiceSender.php";
use Qcloud\Sms\SmsSingleSender;
function wpcom_qcloud_sms_sender($phone, $params, $nationCode='86'){
$options = $GLOBALS['wpmx_options'];
$appid = isset($options['qcloud_sms_appid']) ? $options['qcloud_sms_appid'] : '';
$appkey = isset($options['qcloud_sms_appkey']) ? $options['qcloud_sms_appkey'] : '';
$templateId = isset($options['qcloud_sms_tid']) ? $options['qcloud_sms_tid'] : '';
$sign = isset($options['qcloud_sms_sign']) ? $options['qcloud_sms_sign'] : '';
if(isset($appid) && $appid && $appkey && $templateId && $sign){
// 短信模板ID,需要在短信应用中申请
$ssender = new SmsSingleSender($appid, $appkey);
$result = $ssender->sendWithParam($nationCode?:'86', $phone, $templateId, $params, $sign, "", "");
return json_decode($result);
}else{
$result = new stdClass();
$result->result = -1;
$result->errmsg = '网站未配置短信接口';
return $result;
}
}