优化 检查更新

This commit is contained in:
LyLme 2022-03-06 12:26:57 +08:00
parent 07e167ab31
commit a749be964e
2 changed files with 5 additions and 1 deletions

View File

@ -1,6 +1,7 @@
<?php
include_once("../include/common.php");
if($islogin==1){}else exit("<script language='javascript'>window.location.href='./login.php';</script>");
$update = update(); //检查更新
?>
<!DOCTYPE html>
<html lang="zh">

View File

@ -87,8 +87,11 @@ function authcode($string, $operation = 'DECODE', $key = '', $expiry = 0) {
}
}
function update() {
$update_host = 'cdn.lylme.com'; //程序更新服务器,请勿删除和修改,否则将导致无法接收版本更新和报错
if(@$update = json_decode(file_get_contents('https://'.$update_host.'/lylmes_page/update.json'), true)){}
@$update = json_decode(file_get_contents('https://'.$update_host.'/lylmes_page/update.json'), true);
return $update;
}
function getver($ver){
$vn=explode('.',str_replace('v','',$ver));