후이즈검색 하기 입니다.

· 10년 전 · 851

<?
$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년 전 조회 617
9년 전 조회 1,001
9년 전 조회 1,051
9년 전 조회 788
9년 전 조회 633
9년 전 조회 700
9년 전 조회 1,062
9년 전 조회 721
9년 전 조회 924
9년 전 조회 776
9년 전 조회 857
9년 전 조회 759
9년 전 조회 1,041
9년 전 조회 763
9년 전 조회 734
9년 전 조회 701
9년 전 조회 807
9년 전 조회 709
9년 전 조회 791
9년 전 조회 894
9년 전 조회 671
9년 전 조회 720
9년 전 조회 726
9년 전 조회 867
9년 전 조회 693
9년 전 조회 826
9년 전 조회 625
9년 전 조회 706
9년 전 조회 552
9년 전 조회 763
9년 전 조회 647
9년 전 조회 667
9년 전 조회 727
9년 전 조회 675
9년 전 조회 685
9년 전 조회 657
9년 전 조회 1,027
9년 전 조회 1,064
9년 전 조회 1,052
9년 전 조회 991
9년 전 조회 781
9년 전 조회 933
9년 전 조회 1,065
9년 전 조회 771
9년 전 조회 1,054
9년 전 조회 1,017
10년 전 조회 1,424
10년 전 조회 1,032
10년 전 조회 1,224
10년 전 조회 852
10년 전 조회 1,015
10년 전 조회 729
10년 전 조회 749
10년 전 조회 875
10년 전 조회 841
10년 전 조회 1,000
10년 전 조회 738
10년 전 조회 801
10년 전 조회 770
10년 전 조회 682
10년 전 조회 791
10년 전 조회 635
10년 전 조회 689
10년 전 조회 616
10년 전 조회 709
10년 전 조회 684
10년 전 조회 1,137
10년 전 조회 659
10년 전 조회 586
10년 전 조회 851
10년 전 조회 670
10년 전 조회 645
10년 전 조회 647
10년 전 조회 597
10년 전 조회 542
10년 전 조회 522
10년 전 조회 597
10년 전 조회 613
10년 전 조회 561
10년 전 조회 510
10년 전 조회 599
10년 전 조회 567
10년 전 조회 577
10년 전 조회 634
10년 전 조회 644
10년 전 조회 537
10년 전 조회 577
10년 전 조회 633
10년 전 조회 576
10년 전 조회 666
10년 전 조회 603
10년 전 조회 546
10년 전 조회 522
10년 전 조회 553
10년 전 조회 510
10년 전 조회 544
10년 전 조회 579
10년 전 조회 514
10년 전 조회 564
10년 전 조회 522