function trust_login() { $cet_ping = ping_url("http://openid.ecos.shopex.cn/index.php"); if (!strstr($cet_ping, 'HTTP/1.1 200 OK')) { echo ""; exit; } else { echo 1; exit; } }
function generate_message(&$wait = null, $params = array('serialize' => false), $input = null) { if (is_array($params) && array_key_exists('url', $params)) { $url = $params['url']; } else { $url = 'http://www.google.com'; } $ping = ping_url($url); $data = array('socket_id' => 'push_notification', 'body' => array('routing_key' => 'monitor.ping.' . $ping['http_response_code'], 'code' => $ping['http_response_code'], 'timestamp' => time(), 'ping' => $ping['time'])); if (is_array($params) && array_key_exists('serialize', $params) && $params['serialize']) { $data = json_encode($data); } $wait = 1; return $data; }
function getAppUpdateTime($aData) { $cet_ping = ping_url("http://esb.shopex.cn/api.php"); if (!strstr($cet_ping, 'HTTP/1.1 200 OK')) { return false; } $return = $this->sendRequest("app.get_appkey_time", array('data' => json_encode($aData))); if ($return['result'] == "succ") { return json_decode($return['result_msg'], 1); } else { return false; } }
function sendRequestAsync($ident, $operation_type, $version = "") { $cet_ping = ping_url("http://esb.shopex.cn/api.php"); if (!strstr($cet_ping, 'HTTP/1.1 200 OK')) { return; } if (!$version) { $oAppmgr = $this->system->loadModel("system/appmgr"); $appInfo = $oAppmgr->getPluginInfoByident($ident); $version = $appInfo['plugin_version']; } echo "<script>new Request().post('index.php?ctl=trading/payment&act=sendDataToCenter',{pay_ident:'{$ident}',version:'{$version}',operation_type:'{$operation_type}'});</script>"; }
function getcertidandurl() { $cet_ping = ping_url("http://guide.ecos.shopex.cn/index.php"); if (!strstr($cet_ping, 'HTTP/1.1 200 OK')) { echo $this->system->base_url() . 'error.html'; } else { $certi_model = $this->system->loadModel("service/certificate"); $cert_id = $this->system->getConf("certificate.id"); $base_url = urldecode($this->system->base_url()); $sess_id = $certi_model->get_sess(); $confirmkey = md5($sess_id . 'ShopEx@License' . $cert_id); $center_url = "http://guide.ecos.shopex.cn/index.php?certi_id=" . $cert_id . '&url=' . urlencode($base_url) . '&confirmkey=' . $confirmkey . '&sess_id=' . $sess_id; echo $center_url; } }