From cd288a7f1f110e7aa9a5edc9da0305583b118380 Mon Sep 17 00:00:00 2001 From: ghost Date: Sat, 16 Dec 2023 15:31:15 +0200 Subject: [PATCH] update readme --- README.md | 51 +++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 47 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 82c7f88..3c36a45 100644 --- a/README.md +++ b/README.md @@ -19,16 +19,59 @@ php -S localhost:8080 ## Usage +### Socket + +Check socket + +#### Usage + +* `port` required +* `host` optional, name, IPv4 or IPv6 (`REMOTE_ADDR` by default) + +``` +GET socket.php?port=80&host=php.net +``` + +##### Response + +``` +JSON +{ + status: bool +} +``` + ### Dig -#### Single record +Show host records + +#### Usage + +* `name` required host name, IPv4 or IPv6 +* `record` required if `records` not provided +* `records` required if `record` not provided + + [x] A + + [x] AAAA + + [ ] SRV #1 + +##### Single record + +``` +GET dig.php?name=php.net&record=A +``` + +##### Multiple records ``` -dig.php?name=php.net&record=A +GET dig.php?name=php.net&records[]=A&records[]=AAAA ``` -#### Multiple records +##### Response ``` -dig.php?name=php.net&records[]=A&records[]=AAAA +JSON +{ + status: bool + records: array +} ``` \ No newline at end of file