Rename endpoint network/whois to net/whois
This commit is contained in:
parent
0ed63d18bb
commit
4551d6a37b
@ -35,7 +35,7 @@ $APIS = [
|
||||
"nocache (optional)" => ""
|
||||
]
|
||||
],
|
||||
"network/whois" => [
|
||||
"net/whois" => [
|
||||
"load" => "network.whois.php",
|
||||
"vars" => [
|
||||
"domain" => "/\b((?=[a-z0-9-]{1,63}\.)(xn--)?[a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,63}\b/",
|
||||
|
@ -16,7 +16,7 @@ use Iodev\Whois\Loaders\MemcachedLoader;
|
||||
$json = [];
|
||||
$domain = $VARS["domain"];
|
||||
if (empty($VARS["nocache"])) {
|
||||
$cacheresp = $memcache->get("network.whois.$domain");
|
||||
$cacheresp = $memcache->get("net.whois.$domain");
|
||||
if ($cacheresp !== false) {
|
||||
exitWithJson(json_decode($cacheresp, true));
|
||||
}
|
||||
@ -49,7 +49,7 @@ try {
|
||||
];
|
||||
}
|
||||
$json["status"] = "OK";
|
||||
$memcache->set("network.whois.$domain", json_encode($json), 60 * 60 * 4);
|
||||
$memcache->set("net.whois.$domain", json_encode($json), 60 * 60 * 4);
|
||||
exitWithJson($json);
|
||||
} catch (ConnectionException $e) {
|
||||
sendJsonResp("Disconnect or connection timeout", "ERROR");
|
Loading…
x
Reference in New Issue
Block a user