후이즈검색 하기 입니다.

· 10년 전 · 814

<?
$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년 전 조회 566
9년 전 조회 951
9년 전 조회 1,010
9년 전 조회 719
9년 전 조회 592
9년 전 조회 643
9년 전 조회 1,004
9년 전 조회 667
9년 전 조회 878
9년 전 조회 722
9년 전 조회 816
9년 전 조회 687
9년 전 조회 996
9년 전 조회 708
9년 전 조회 681
9년 전 조회 650
9년 전 조회 765
9년 전 조회 681
9년 전 조회 732
9년 전 조회 846
9년 전 조회 625
9년 전 조회 666
9년 전 조회 685
9년 전 조회 806
9년 전 조회 651
9년 전 조회 786
9년 전 조회 569
9년 전 조회 644
9년 전 조회 514
9년 전 조회 709
9년 전 조회 600
9년 전 조회 614
9년 전 조회 667
9년 전 조회 618
9년 전 조회 620
9년 전 조회 606
9년 전 조회 973
9년 전 조회 1,017
9년 전 조회 983
9년 전 조회 951
9년 전 조회 727
9년 전 조회 881
9년 전 조회 1,015
9년 전 조회 717
9년 전 조회 996
9년 전 조회 953
9년 전 조회 1,377
10년 전 조회 985
10년 전 조회 1,165
10년 전 조회 815
10년 전 조회 961
10년 전 조회 690
10년 전 조회 697
10년 전 조회 812
10년 전 조회 776
10년 전 조회 965
10년 전 조회 675
10년 전 조회 741
10년 전 조회 728
10년 전 조회 628
10년 전 조회 730
10년 전 조회 587
10년 전 조회 636
10년 전 조회 569
10년 전 조회 664
10년 전 조회 640
10년 전 조회 1,095
10년 전 조회 604
10년 전 조회 529
10년 전 조회 801
10년 전 조회 636
10년 전 조회 598
10년 전 조회 583
10년 전 조회 547
10년 전 조회 491
10년 전 조회 468
10년 전 조회 543
10년 전 조회 556
10년 전 조회 513
10년 전 조회 455
10년 전 조회 542
10년 전 조회 535
10년 전 조회 524
10년 전 조회 595
10년 전 조회 599
10년 전 조회 485
10년 전 조회 526
10년 전 조회 586
10년 전 조회 524
10년 전 조회 609
10년 전 조회 554
10년 전 조회 495
10년 전 조회 467
10년 전 조회 502
10년 전 조회 485
10년 전 조회 493
10년 전 조회 519
10년 전 조회 456
10년 전 조회 504
10년 전 조회 462