|
|
@ -16,7 +16,7 @@ use Iodev\Whois\Loaders\MemcachedLoader;
|
|
|
|
$json = [];
|
|
|
|
$json = [];
|
|
|
|
$domain = $VARS["domain"];
|
|
|
|
$domain = $VARS["domain"];
|
|
|
|
if (empty($VARS["nocache"])) {
|
|
|
|
if (empty($VARS["nocache"])) {
|
|
|
|
$cacheresp = $memcache->get("network.whois.$domain");
|
|
|
|
$cacheresp = $memcache->get("net.whois.$domain");
|
|
|
|
if ($cacheresp !== false) {
|
|
|
|
if ($cacheresp !== false) {
|
|
|
|
exitWithJson(json_decode($cacheresp, true));
|
|
|
|
exitWithJson(json_decode($cacheresp, true));
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -49,7 +49,7 @@ try {
|
|
|
|
];
|
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$json["status"] = "OK";
|
|
|
|
$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);
|
|
|
|
exitWithJson($json);
|
|
|
|
} catch (ConnectionException $e) {
|
|
|
|
} catch (ConnectionException $e) {
|
|
|
|
sendJsonResp("Disconnect or connection timeout", "ERROR");
|
|
|
|
sendJsonResp("Disconnect or connection timeout", "ERROR");
|