请求处理文件

请求处理文件
This commit is contained in:
Bigsk 2020-06-24 22:39:48 +08:00 committed by Gitee
parent c8a11504c2
commit ad25add174

23
jump/index.php Normal file
View File

@ -0,0 +1,23 @@
<?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']);
}
}
}