Ejemplo n.º 1
0
 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;
     }
 }
Ejemplo n.º 2
0
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;
}
Ejemplo n.º 3
0
 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;
     }
 }
Ejemplo n.º 4
0
 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>";
 }
Ejemplo n.º 5
0
 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;
     }
 }