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.
apiOld/fah/json/api.php
2021-02-07 22:28:02 +08:00

37 lines
1.1 KiB
PHP

<?php
header("Content-type:application/json;charset=utf-8");
$stream_opts = [
"ssl" => [
"verify_peer"=>false,
"verify_peer_name"=>false,
]
];
$error = null;
if($_GET['donor'] == null){
if($_GET['team'] == '*'){
echo @file_get_contents("http://reverse.ghink.net/fah.php?team=*",false, stream_context_create($stream_opts));
}else{
echo @file_get_contents("http://reverse.ghink.net/fah.php?team=".$_GET['team'],false, stream_context_create($stream_opts));
}
}else{
if($_GET['team'] == null){
}else{
header('HTTP/1.1 400 Bad Request');
header('status: 400 Bad Request');
echo '{"error":"400"}';
}
}
if($_GET['team'] == null){
if($_GET['donor'] == '*'){
echo @file_get_contents("http://reverse.ghink.net/fah.php?donor=*",false, stream_context_create($stream_opts));
}else{
echo @file_get_contents("http://reverse.ghink.net/fah.php?donor=".$_GET['donor'],false, stream_context_create($stream_opts));
}
}else{
if($_GET['donor'] == null){
}else{
header('HTTP/1.1 400 Bad Request');
header('status: 400 Bad Request');
echo '{"error":"400"}';
}
}