ad25add174
请求处理文件
23 lines
868 B
PHP
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']);
|
|
}
|
|
}
|
|
} |