{ global $_G; //序列化 $dataset = rawurlencode(authcrypt(serialize($command), VI_SECRET)); //发送请求 $return = @file_get_contents($_G['project']['home'] . 'api.php?action=cloud&domain=' . VI_HOST . '&execute=' . $dataset); //反序列化 $content = $return ? unserialize($return) : array('return' => 'respond'); return $content; } /* 验证当前版本信息 */ public static function licence() { global $_G; $text = file_get_contents($_G['project']['home'] . 'api.php?action=service&execute=business&version=' . $_G['product']['version'] . '&charset=' . $_G['product']['charset'] . '&domain=' . urlencode(VI_HOST) . '&secret=' . VI_SECRET); $data = unserialize($text); if ($data) { $file = VI_ROOT . "config/licence.php"; //写入到缓存 create_file($file, '<?php $_G[\'licence\'] = ' . var_export($data, TRUE) . ';?>'); //刷新缓存 $_G['licence'] = $data; } return $data; } } //初始化 Cloud::init();