Spaceping server part
This commit is contained in:
parent
3a0663bd70
commit
1e8d615877
3 changed files with 25 additions and 0 deletions
13
server/ping-get.php
Normal file
13
server/ping-get.php
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
<?php
|
||||||
|
header('Content-type: text/plain');
|
||||||
|
if(isset($_GET['apikey']) && ($_GET['apikey']=='apikey1' || $_GET['apikey']=='apikey2')){
|
||||||
|
$str=file_get_contents('pinged.txt');
|
||||||
|
echo $str;
|
||||||
|
file_put_contents ( 'pinged.txt' , 'false' );
|
||||||
|
}else{
|
||||||
|
$str=file_get_contents('pinged.txt');
|
||||||
|
echo "API Key Missing!\n";
|
||||||
|
echo $str;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
12
server/ping.php
Normal file
12
server/ping.php
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
<?php
|
||||||
|
header('Content-type: text/plain');
|
||||||
|
if(isset($_GET['apikey']) && ($_GET['apikey']=='apikey1' || $_GET['apikey']=='apikey2')){
|
||||||
|
file_put_contents ( 'pinged.txt' , 'true' );
|
||||||
|
echo true;
|
||||||
|
}else{
|
||||||
|
$str=file_get_contents('pinged.txt');
|
||||||
|
echo "API Key Missing!\n";
|
||||||
|
echo $str;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
0
server/pinged.txt
Normal file
0
server/pinged.txt
Normal file
Reference in a new issue