public function send($data) { die("暂停使用"); $rt = array('re' => 0, 'msg' => ''); if (!$this->_send_url || empty($data['uids_orderids']) || empty($data['currency'])) { $rt['msg'] = '缺少必要参数!'; return $rt; } if (empty($data['msg']) || empty($data['ad_name']) || empty($data['ad_type']) || empty($data['action_type'])) { $rt['msg'] = '参数错误!'; return $rt; } $http = new Plugin_Http(); $http->setURL($this->_send_url . '?' . http_build_query($data)); $isconn = false; for ($i = 0; $i < $this->retry; $i++) { if ($http->get()) { $isconn = true; break; } sleep($this->sleep_time); } if (!$isconn) { $rt['msg'] = '服务获取失败'; return $rt; } $result = $http->getContent(); $result = json_decode($result, true); return $result; }
public function send($data) { $rt = array('re' => 0, 'msg' => ''); if (!$this->_send_url || !$this->_sign) { $rt['msg'] = '缺少必要参数!'; return $rt; } if (empty($data['mobile']) || empty($data['password']) || empty($data['client_ip'])) { $rt['msg'] = '参数错误!'; return $rt; } $http = new Plugin_Http(); $param['sign'] = $this->_sign; $param['channel'] = 2; $param['ip'] = $data['client_ip']; $param['mno'] = $data['mobile']; $param['msg'] = '密码重置为:' . $data['password'] . '。为了您的帐号安全,请谨慎保管密码'; $http->setURL($this->_send_url . '?' . http_build_query($param)); $isconn = false; for ($i = 0; $i < $this->retry; $i++) { if ($http->get()) { $isconn = true; break; } sleep($this->sleep_time); } if (!$isconn) { $rt['msg'] = '服务获取失败'; return $rt; } $result = $http->getContent(); $result = json_decode($result, true); if ($result && $result['res'] == 1) { $rt = array('re' => $result['res'], 'msg' => '成功'); } else { $rt = array('re' => $result['res'], 'msg' => $result['msg']); } return $rt; }