diff --git a/show/include/func.php b/show/include/func.php index 343c36c..05e8aee 100644 --- a/show/include/func.php +++ b/show/include/func.php @@ -687,4 +687,23 @@ function send_yzm_atom($cellphone, $yzm) { $s = gquery("https://cp.fsecity.com/xz/9e0f2d8926b/txgj/txgj_qy/sd_api/?act=send_sms_tpl", $post); //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"; + + $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); } \ No newline at end of file