From 4551d6a37b5489344e3257f86aa3dd97d008e2ee Mon Sep 17 00:00:00 2001 From: Skylar Ittner Date: Sun, 16 May 2021 16:53:53 -0600 Subject: [PATCH] Rename endpoint network/whois to net/whois --- apiconfig.php | 2 +- endpoints/{network.whois.php => net.whois.php} | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) rename endpoints/{network.whois.php => net.whois.php} (93%) diff --git a/apiconfig.php b/apiconfig.php index 987c6b9..ef6dd31 100644 --- a/apiconfig.php +++ b/apiconfig.php @@ -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/", diff --git a/endpoints/network.whois.php b/endpoints/net.whois.php similarity index 93% rename from endpoints/network.whois.php rename to endpoints/net.whois.php index 940b3c8..1c760f5 100644 --- a/endpoints/network.whois.php +++ b/endpoints/net.whois.php @@ -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");