Added getIp action to remote.php
This commit is contained in:
parent
135f88015f
commit
869ba131ef
|
@ -21,6 +21,7 @@ require_once '../lib/database.php';
|
||||||
require_once '../lib/update-serial.php';
|
require_once '../lib/update-serial.php';
|
||||||
|
|
||||||
if(filter_input(INPUT_SERVER, "REQUEST_METHOD") == "GET") {
|
if(filter_input(INPUT_SERVER, "REQUEST_METHOD") == "GET") {
|
||||||
|
if(filter_input(INPUT_GET, "action") == "updateRecord") {
|
||||||
$input_domain = filter_input(INPUT_GET, "domain");
|
$input_domain = filter_input(INPUT_GET, "domain");
|
||||||
$input_id = filter_input(INPUT_GET, "id");
|
$input_id = filter_input(INPUT_GET, "id");
|
||||||
$input_password = filter_input(INPUT_GET, "password");
|
$input_password = filter_input(INPUT_GET, "password");
|
||||||
|
@ -57,7 +58,11 @@ if(filter_input(INPUT_SERVER, "REQUEST_METHOD") == "GET") {
|
||||||
$return['status'] = "success";
|
$return['status'] = "success";
|
||||||
echo json_encode($return);
|
echo json_encode($return);
|
||||||
exit();
|
exit();
|
||||||
|
} else if(filter_input(INPUT_GET, "action") == "getIp") {
|
||||||
|
$return['ip'] = filter_input(INPUT_SERVER, "REMOTE_ADDR");
|
||||||
|
echo json_encode($return);
|
||||||
|
exit();
|
||||||
|
}
|
||||||
} else if(filter_input(INPUT_SERVER, "REQUEST_METHOD") == "POST") {
|
} else if(filter_input(INPUT_SERVER, "REQUEST_METHOD") == "POST") {
|
||||||
$input = json_decode(file_get_contents('php://input'));
|
$input = json_decode(file_get_contents('php://input'));
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue