Create api.whois.kr.php
This commit is contained in:
parent
fcc1e1c4a0
commit
14644f9962
30
helper/api.whois.kr.php
Normal file
30
helper/api.whois.kr.php
Normal file
|
@ -0,0 +1,30 @@
|
|||
<?php
|
||||
/**
|
||||
* @file api.whois.kr.php
|
||||
* @date 2019-05-26
|
||||
* @author Go Namhyeon <gnh1201@gmail.com>
|
||||
* @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;
|
||||
}
|
Loading…
Reference in New Issue
Block a user