mirror of
https://github.com/YGGverse/web-api.git
synced 2025-03-13 05:51:41 +00:00
update depencency name
This commit is contained in:
parent
0d95eaecc4
commit
e06e5813f8
@ -1,12 +1,12 @@
|
|||||||
# dns-api
|
# net-api
|
||||||
|
|
||||||
Simple DNS API
|
Simple Network Tools API
|
||||||
|
|
||||||
## Install
|
## Install
|
||||||
|
|
||||||
```
|
```
|
||||||
git clone https://github.com/YGGverse/dns-api.git
|
git clone https://github.com/YGGverse/net-api.git
|
||||||
cd dns-api
|
cd net-api
|
||||||
composer install
|
composer install
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
{
|
{
|
||||||
"name": "yggverse/dns-api",
|
"name": "yggverse/net-api",
|
||||||
"type": "project",
|
"type": "project",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Yggverse\\DnsApi\\": "src/"
|
"Yggverse\\NetApi\\": "src/"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"yggverse/dns": "^1.0"
|
"yggverse/net": "^1.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
20
composer.lock
generated
20
composer.lock
generated
@ -4,26 +4,26 @@
|
|||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "4fd3c797b2c98cf2e93558b64c5da47b",
|
"content-hash": "0bf82e6e2a05c49f8a6c7e89da62a373",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "yggverse/dns",
|
"name": "yggverse/net",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/YGGverse/dns-php.git",
|
"url": "https://github.com/YGGverse/net-php.git",
|
||||||
"reference": "e54a40bb673e3c4cb87d8d7275adc7121042281e"
|
"reference": "3a89da61d56fba97e5f48c2d840dd9f70b4fd295"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/YGGverse/dns-php/zipball/e54a40bb673e3c4cb87d8d7275adc7121042281e",
|
"url": "https://api.github.com/repos/YGGverse/net-php/zipball/3a89da61d56fba97e5f48c2d840dd9f70b4fd295",
|
||||||
"reference": "e54a40bb673e3c4cb87d8d7275adc7121042281e",
|
"reference": "3a89da61d56fba97e5f48c2d840dd9f70b4fd295",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Yggverse\\Dns\\": "src/"
|
"Yggverse\\Net\\": "src/"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
@ -31,10 +31,10 @@
|
|||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/YGGverse/dns-php/issues",
|
"issues": "https://github.com/YGGverse/net-php/issues",
|
||||||
"source": "https://github.com/YGGverse/dns-php/tree/1.0.0"
|
"source": "https://github.com/YGGverse/net-php/tree/1.0.0"
|
||||||
},
|
},
|
||||||
"time": "2023-12-15T16:19:42+00:00"
|
"time": "2023-12-16T10:55:48+00:00"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"packages-dev": [],
|
"packages-dev": [],
|
||||||
|
@ -8,7 +8,7 @@ header('Content-Type: application/json; charset=utf-8');
|
|||||||
require_once(__DIR__ . '/../../vendor/autoload.php');
|
require_once(__DIR__ . '/../../vendor/autoload.php');
|
||||||
|
|
||||||
// Valid name required to continue
|
// Valid name required to continue
|
||||||
if (empty($_GET['name']) || !is_string($_GET['name']) || !\Yggverse\Dns\Dig::isHostName($_GET['name']))
|
if (empty($_GET['name']) || !is_string($_GET['name']) || !\Yggverse\Net\Dig::isHostName($_GET['name']))
|
||||||
{
|
{
|
||||||
exit(
|
exit(
|
||||||
json_encode(
|
json_encode(
|
||||||
@ -23,7 +23,7 @@ if (empty($_GET['name']) || !is_string($_GET['name']) || !\Yggverse\Dns\Dig::isH
|
|||||||
// Valid records required to continue
|
// Valid records required to continue
|
||||||
$records = [];
|
$records = [];
|
||||||
|
|
||||||
if (isset($_GET['record']) && is_string($_GET['record']) && \Yggverse\Dns\Dig::isRecord($_GET['record']))
|
if (isset($_GET['record']) && is_string($_GET['record']) && \Yggverse\Net\Dig::isRecord($_GET['record']))
|
||||||
{
|
{
|
||||||
$records[] = $_GET['record'];
|
$records[] = $_GET['record'];
|
||||||
}
|
}
|
||||||
@ -32,7 +32,7 @@ if (isset($_GET['records']) && is_array($_GET['records']))
|
|||||||
{
|
{
|
||||||
foreach ($_GET['records'] as $record)
|
foreach ($_GET['records'] as $record)
|
||||||
{
|
{
|
||||||
if (is_string($record) && \Yggverse\Dns\Dig::isRecord($record))
|
if (is_string($record) && \Yggverse\Net\Dig::isRecord($record))
|
||||||
{
|
{
|
||||||
$records[] = $record;
|
$records[] = $record;
|
||||||
}
|
}
|
||||||
@ -61,7 +61,7 @@ if (empty($records))
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Resolve begin
|
// Resolve begin
|
||||||
if (!$result = \Yggverse\Dns\Dig::records($_GET['name'], array_unique($records)))
|
if (!$result = \Yggverse\Net\Dig::records($_GET['name'], array_unique($records)))
|
||||||
{
|
{
|
||||||
exit(
|
exit(
|
||||||
json_encode(
|
json_encode(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user