Exemplo n.º 1
0
	public function massSend1($mob,$content, $time, $isSub=false) {
		if(!$isSub){
			$uid = $this->msgconfig ['sms'] ['user']; // 分配给你的账号
			$pwd = $this->msgconfig ['sms'] ['pass']; // 密码
		}else{
			$uid = $this->msgconfig ['sms'] ['subuser']; // 分配给你的账号
			$pwd = $this->msgconfig ['sms'] ['subpass']; // 密码
		}
		$mob = $mob; // 发送号码用逗号分隔
		$content = urlencode ( auto_charset ( $content, "utf-8", 'gbk' ) ); // 短信内容
		                                                          
		// 功能:发送短信
		// $time = date('YmdHi',time());
		
		// 备用IP地址为203.81.21.13
		$fp = fopen ( $this->ismsinfo ["MASSSEND_URL"] . "?name=$uid&pwd=$pwd&dst=$mob&msg=$content&time=$time", "r" );
		$ret = fgetss ( $fp, 255 );
		$ret = auto_charset ( $ret, "gbk", 'utf-8' );
		fclose ( $fp );
		$data = dealSmsResult ( $ret );
		return $data;
	}
Exemplo n.º 2
0
	public function massSendCcdx($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, 'smsType'=>'CCDX');
		try{
			$ret = $client->massSendCcdx($param);
			$data = dealSmsResult($ret->massSendCcdxResult);
		}catch(Exception $e){
			$data = $e->getMessage();
		}
		return $data;
	}