From 14644f99627da26ebbc54cc8f44ed6ed56a9bb87 Mon Sep 17 00:00:00 2001 From: "Namhyeon, Go" Date: Sun, 26 May 2019 00:43:58 +0900 Subject: [PATCH] Create api.whois.kr.php --- helper/api.whois.kr.php | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 helper/api.whois.kr.php diff --git a/helper/api.whois.kr.php b/helper/api.whois.kr.php new file mode 100644 index 0000000..0694758 --- /dev/null +++ b/helper/api.whois.kr.php @@ -0,0 +1,30 @@ + + * @brief KISA Whois/IP/AS Query Helper (https://whois.kr) + */ + +if(!check_function_exists("get_whois_kr")) { + function get_whois_kr($name, $key, $type="whois") { + $response = false; + + switch($type) { + case "whois": + $response = get_web_json("http://whois.kisa.or.kr/openapi/whois.jsp", "get.cache", array( + "query" => $name, + "key" => $key, + )); + break; + case "ipascc": + $response = get_web_json("http://whois.kisa.or.kr/openapi/ipascc.jsp", "get.cache", array( + "query" => $name, + "key" => $key, + )); + break; + } + } + + return $response; +}