후이즈검색 하기 입니다.

· 10년 전 · 885

<?
$whois_server = array(
        'com' => 'whois.internic.net',
        'net' => 'whois.internic.net',
        'org' => 'whois.publicinterestregistry.net',
        'co.kr' => 'whois.krnic.net'
);
$whois_avail  = array(
        'whois.internic.net' => 'No match for ',
        'whois.publicinterestregistry.net' => 'NOT FOUND',
        'whois.krnic.net' => 'is not registered to KRNIC'
);

// 도메인 조회 함수
function check_domain( $domain, $suffix ) {
        global $whois_server,$whois_avail;

        $server = $whois_server[$suffix];
        $avail  = $whois_avail[$server];

        // 잘못된 도메인(com,net,org,co.kr이 아닌)
        if (!$server) return false;

        $sock = fsockopen($server,43,$errno,$errstr,30);
        if (!$sock) {
                echo "$errstr [$errno]";
                return false;
        }
        fwrite($sock,"$domain.$suffix\r\n");
        while (!feof($sock)) {
                $ret .= fgets($sock);
        }
    echo $ret;
        fclose($sock);

        if (strstr($ret,$avail)) return true;
        return false;
}

// 조회 도메인이 있다면
if ($domain) {
        echo "<table cellspacing=0 border=1>\n";
        foreach($whois_server as $suffix => $server) {
                $ret = check_domain($domain,$suffix);
                if ($ret)
                        $OX = 'O';
                else
                        $OX = 'X';
                echo " <tr>\n";
                echo "  <td align=right>$domain.$suffix ($OX)</td>\n";
                echo "  <td> 등록 ";
                if (!$ret) echo "불";
                echo "가능</td>\n";
                echo " </tr>\n";
        }
        echo "</table>\n";
}
?>
<br><br><h3>Domain Search</h3>
<hr size=-1>
<form method=post>
Search Domain : <input type=text name=domain value="<?=$domain?>"><input type=submit value="조회">
</form>  

|
댓글을 작성하시려면 로그인이 필요합니다.

프로그램

+
제목 글쓴이 날짜 조회
9년 전 조회 638
9년 전 조회 1,016
9년 전 조회 1,075
9년 전 조회 798
9년 전 조회 656
9년 전 조회 721
9년 전 조회 1,078
9년 전 조회 736
9년 전 조회 945
9년 전 조회 796
9년 전 조회 882
9년 전 조회 766
9년 전 조회 1,058
9년 전 조회 782
9년 전 조회 757
9년 전 조회 721
9년 전 조회 826
9년 전 조회 728
9년 전 조회 811
9년 전 조회 918
9년 전 조회 694
9년 전 조회 742
9년 전 조회 753
9년 전 조회 886
9년 전 조회 729
9년 전 조회 850
9년 전 조회 652
9년 전 조회 732
9년 전 조회 581
9년 전 조회 781
9년 전 조회 671
9년 전 조회 688
9년 전 조회 756
9년 전 조회 703
9년 전 조회 715
9년 전 조회 681
9년 전 조회 1,058
9년 전 조회 1,086
9년 전 조회 1,074
9년 전 조회 1,019
9년 전 조회 810
9년 전 조회 969
9년 전 조회 1,092
9년 전 조회 788
9년 전 조회 1,082
10년 전 조회 1,044
10년 전 조회 1,453
10년 전 조회 1,059
10년 전 조회 1,252
10년 전 조회 886
10년 전 조회 1,042
10년 전 조회 754
10년 전 조회 786
10년 전 조회 903
10년 전 조회 874
10년 전 조회 1,028
10년 전 조회 767
10년 전 조회 822
10년 전 조회 800
10년 전 조회 711
10년 전 조회 820
10년 전 조회 661
10년 전 조회 716
10년 전 조회 647
10년 전 조회 731
10년 전 조회 710
10년 전 조회 1,160
10년 전 조회 687
10년 전 조회 619
10년 전 조회 874
10년 전 조회 697
10년 전 조회 667
10년 전 조회 678
10년 전 조회 630
10년 전 조회 569
10년 전 조회 552
10년 전 조회 633
10년 전 조회 646
10년 전 조회 597
10년 전 조회 538
10년 전 조회 628
10년 전 조회 595
10년 전 조회 602
10년 전 조회 667
10년 전 조회 672
10년 전 조회 565
10년 전 조회 607
10년 전 조회 666
10년 전 조회 600
10년 전 조회 695
10년 전 조회 634
10년 전 조회 575
10년 전 조회 544
10년 전 조회 586
10년 전 조회 540
10년 전 조회 578
10년 전 조회 605
10년 전 조회 543
10년 전 조회 586
10년 전 조회 557