|
- <?php
-
- /**
- * Created by PhpStorm.
- * User: Steven
- * Date: 2016/11/4
- * Time: 14:47
- * 发送短信模板
- */
- require_once __DIR__ . '/../Common/zzfxUtils.class.php';
-
- class message
- {
- //TODO:在其他文件调用:message::sendMessage($type, $array);
- static function sendMessage($type, $array)
- {
- switch ($type) {
- case 1://发送验证码
- $phones = $array['phone'];
- $content = '您的验证码为:' . $array['code'];
- $send_data = array();
- $send_data["cdkey"] = "8SDK-EMY-6699-RISUM";
-
- $send_data["password"] = "175348";
- $send_data["phone"] = $phones;
- $send_data["message"] = '【蜘蛛行】'.$content;
- if (SEND_MESSAGE ==true){
- //$url='http://www.mxtong.net.cn/GateWay/Services.asmx/DirectSend?UserID=995596&Account=alert&Password=zzcx8888&Phones='.$phones.'&Content='.$content.'【蜘蛛行】&SendTime=&SendType=1&PostFixNumber=';
- $url='http://hprpt2.eucp.b2m.cn:8080/sdkproxy/sendsms.action';
- //echo $url;
- $response=zzcsUtils::httpRequest($url,$send_data);//发送请求
- }else{
- return array("未开启短信通知");
- }
- return $response;
- }
- }
- }
|