diff --git a/ADBService.php b/ADBService.php index c1e9e4d..b9fb6fc 100644 --- a/ADBService.php +++ b/ADBService.php @@ -4,6 +4,7 @@ include_once 'ADBKeyCodes.php'; class ADBService { + const DEFAULT_HOST = '192.168.1.132'; private $host; public function __construct($host) diff --git a/execute.php b/execute.php index 7ddb5e0..fecaa88 100644 --- a/execute.php +++ b/execute.php @@ -3,9 +3,8 @@ $axiosRequest = json_decode(file_get_contents('php://input')); include_once 'ADBService.php'; -const HOST = '192.168.1.132'; -$service = new ADBService(HOST); +$service = new ADBService(ADBService::DEFAULT_HOST); $service->connect(); echo json_encode([$service->sendKey($axiosRequest->keyCode)]); diff --git a/index.html b/index.php similarity index 93% rename from index.html rename to index.php index 5b19e6e..025b371 100644 --- a/index.html +++ b/index.php @@ -1,3 +1,10 @@ + +
@@ -37,6 +44,10 @@ + +