Example #1
0
	public function massSend1($mob, $content, $time, $isSub=false){
		$client = new SoapClient($this->wsdl);
		if(!$isSub){
			$sName = $this->msgconfig['sms']['user'];
			$sPwdDES = do_mencrypt($this->msgconfig['sms']['pass'], $this->smsdeskey);
		}else{
			$sName = $this->msgconfig['sms']['subuser'];
			$sPwdDES = do_mencrypt($this->msgconfig['sms']['subpass'], $this->smsdeskey);
		}
		$sDst = do_mencrypt($mob, $this->smsdeskey);
		$sMsg = do_mencrypt(auto_charset($content,"utf-8",'gbk'), $this->smsdeskey);
		$sTime = do_mencrypt($time, $this->smsdeskey);
		$sExNo = do_mencrypt('', $this->smsdeskey);
		$param = array('sName'=>$sName,'sPwd'=>$sPwdDES, 'sDst'=>$sDst, 'sMsg'=>$sMsg, 'sTime'=>$sTime, 'sExNo'=>$sExNo);
		try{
			$ret = $client->massSend($param);
			$data = dealSmsResult($ret->massSendResult);
		}catch(Exception $e){
			$data = $e->getMessage();
		}
		return $data;
	}