Change-Id: I59353a44dd08de691ee351d47d57aad3e1f3acb2
This commit is contained in:
vguanyiwgd 2024-05-30 11:31:32 +08:00
parent a1689a5dc8
commit b65056510c
2 changed files with 36 additions and 33 deletions

View File

@ -294,25 +294,27 @@ function send_sms($phone, $msg)
}
send_sms_dx($phone, $msg);
}
if(!function_exists("send_sms_ek")) {
function send_sms_ek($mobile, $msg)
{
$appid = 'svcXhqBFtbvNS6GUVumSM8k0WarOLiOZ';
$appkey = 'ex1JUa3xO3JFXB9k5OqULKYYoJz7A2nV';
$msg = '【云中美食】'.$msg;
$sign = md5($appid.$mobile.$msg.$appkey);
$url = "https://sms.189ek.com/yktsms/send";
function send_sms_ek($mobile, $msg)
{
$appid = 'svcXhqBFtbvNS6GUVumSM8k0WarOLiOZ';
$appkey = 'ex1JUa3xO3JFXB9k5OqULKYYoJz7A2nV';
$msg = '【云中美食】'.$msg;
$sign = md5($appid.$mobile.$msg.$appkey);
$url = "https://sms.189ek.com/yktsms/send";
$c = curl_init($url);
curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($c, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($c, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($c, CURLOPT_POST, 1);
curl_setopt($c, CURLOPT_POSTFIELDS, "appid={$appid}&mobile={$mobile}&msg=".urlencode($msg)."&sign={$sign}");
curl_setopt($c, CURLOPT_TIMEOUT, 10);
curl_exec($c);
curl_close($c);
$c = curl_init($url);
curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($c, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($c, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($c, CURLOPT_POST, 1);
curl_setopt($c, CURLOPT_POSTFIELDS, "appid={$appid}&mobile={$mobile}&msg=".urlencode($msg)."&sign={$sign}");
curl_setopt($c, CURLOPT_TIMEOUT, 10);
curl_exec($c);
curl_close($c);
}
}
function get_code($table, $zd, $len, $type, $pre = '') {
global $db;
while(1) {

View File

@ -689,21 +689,22 @@ function send_yzm_atom($cellphone, $yzm) {
//echo $s;
}
function send_sms_ek($mobile, $msg)
{
$appid = 'svcXhqBFtbvNS6GUVumSM8k0WarOLiOZ';
$appkey = 'ex1JUa3xO3JFXB9k5OqULKYYoJz7A2nV';
$msg = '【云中美食】'.$msg;
$sign = md5($appid.$mobile.$msg.$appkey);
$url = "https://sms.189ek.com/yktsms/send";
if(!function_exists("send_sms_ek")) {
function send_sms_ek($mobile, $msg) {
$appid = 'svcXhqBFtbvNS6GUVumSM8k0WarOLiOZ';
$appkey = 'ex1JUa3xO3JFXB9k5OqULKYYoJz7A2nV';
$msg = '【云中美食】' . $msg;
$sign = md5($appid . $mobile . $msg . $appkey);
$url = "https://sms.189ek.com/yktsms/send";
$c = curl_init($url);
curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($c, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($c, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($c, CURLOPT_POST, 1);
curl_setopt($c, CURLOPT_POSTFIELDS, "appid={$appid}&mobile={$mobile}&msg=".urlencode($msg)."&sign={$sign}");
curl_setopt($c, CURLOPT_TIMEOUT, 10);
curl_exec($c);
curl_close($c);
$c = curl_init($url);
curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($c, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($c, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($c, CURLOPT_POST, 1);
curl_setopt($c, CURLOPT_POSTFIELDS, "appid={$appid}&mobile={$mobile}&msg=" . urlencode($msg) . "&sign={$sign}");
curl_setopt($c, CURLOPT_TIMEOUT, 10);
curl_exec($c);
curl_close($c);
}
}