This repository has been archived on 2022-12-28. You can view files and clone it, but cannot push or open issues or pull requests.
gemcapi/jump/index.php
Bigsk ad25add174 请求处理文件
请求处理文件
2020-06-24 22:39:48 +08:00

23 lines
868 B
PHP

<?php
session_start();
if($_SERVER['HTTP_HOST'] == 'gemcapi.ghink.net'){
if($_GET['path'] == null){
echo '{"wikis": "https://gitee.com/ghink/gemcapi/wikis"}';
}else{
if($_GET['token'] == null){
if($_SESSION['times1'] < 11){
header('Location: http://1.free.gemcapi.ghink.net:10000/'.$_GET['path']);
$_SESSION['times1'] = $_SESSION['times1'] + 1;
$_SESSION['times2'] = 0;
}else{
header('Location: http://2.free.gemcapi.ghink.net:10000/'.$_GET['path']);
$_SESSION['times2'] = $_SESSION['times2'] + 1;
if($_SESSION['times2'] = 10){
$_SESSION['times1'] = 0;
}
}
}else{
header('Location: http://1.free.gemcapi.ghink.net:10000/'.$_GET['path']);
}
}
}