mirror of
https://github.com/YGGverse/web-api.git
synced 2026-03-31 17:45:30 +00:00
841 B
841 B
net-api
Simple Network Tools API
Install
git clone https://github.com/YGGverse/net-api.git
cd net-api
composer install
Run
cd src/public
php -S localhost:8080
Usage
Socket
Check socket
Usage
portrequiredhostoptional, name, IPv4 or IPv6 (REMOTE_ADDRby default)
GET socket.php?port=80&host=php.net
Response
JSON
{
status: bool
}
Dig
Show host records
Usage
namerequired host name, IPv4 or IPv6recordrequired ifrecordsnot providedrecordsrequired ifrecordnot provided- A
- AAAA
- SRV #1
Single record
GET dig.php?name=php.net&record=A
Multiple records
GET dig.php?name=php.net&records[]=A&records[]=AAAA
Response
JSON
{
status: bool
records: array
}