후이즈검색 소스

<?
$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> 

 

[이 게시물은 관리자님에 의해 2011-10-31 17:16:08 PHP & HTML에서 이동 됨]
|
댓글을 작성하시려면 로그인이 필요합니다.

프로그램

+
제목 글쓴이 날짜 조회
15년 전 조회 1,281
15년 전 조회 1,320
15년 전 조회 1,572
15년 전 조회 1,063
15년 전 조회 1,428
15년 전 조회 723
15년 전 조회 1,066
15년 전 조회 1,327
15년 전 조회 2,737
15년 전 조회 1,103
15년 전 조회 1,084
15년 전 조회 977
15년 전 조회 859
15년 전 조회 873
15년 전 조회 3,461
15년 전 조회 2,832
15년 전 조회 2,007
15년 전 조회 2,455
15년 전 조회 1,541
15년 전 조회 1,092
15년 전 조회 1,092
15년 전 조회 2,370
15년 전 조회 916
15년 전 조회 1,957
15년 전 조회 756
15년 전 조회 1,907
15년 전 조회 841
15년 전 조회 2,513
15년 전 조회 760
15년 전 조회 1,196
15년 전 조회 741
15년 전 조회 2,906
15년 전 조회 1,286
15년 전 조회 1,318
15년 전 조회 1,323
15년 전 조회 1,388
15년 전 조회 994
15년 전 조회 1,753
15년 전 조회 1,285
15년 전 조회 866
15년 전 조회 2,727
15년 전 조회 1,114
15년 전 조회 1,309
15년 전 조회 1,115
15년 전 조회 1,962
15년 전 조회 1,976
15년 전 조회 1,626
15년 전 조회 985
15년 전 조회 1,218
15년 전 조회 917
15년 전 조회 861
15년 전 조회 1,113
15년 전 조회 2,468
15년 전 조회 2,496
15년 전 조회 1,470
15년 전 조회 1,011
15년 전 조회 1,171
15년 전 조회 1,178
15년 전 조회 1,043
15년 전 조회 941
15년 전 조회 871
15년 전 조회 1,233
15년 전 조회 1,183
15년 전 조회 928
15년 전 조회 902
15년 전 조회 1,076
15년 전 조회 1,541
15년 전 조회 1,074
15년 전 조회 1,403
15년 전 조회 1,237
15년 전 조회 1,915
15년 전 조회 2,976
15년 전 조회 2,309
15년 전 조회 904
15년 전 조회 1,918
15년 전 조회 2,104
15년 전 조회 1,406
15년 전 조회 1,379
15년 전 조회 2,647
15년 전 조회 2,532
15년 전 조회 5,518
15년 전 조회 1,485
15년 전 조회 4,245
15년 전 조회 1,378
15년 전 조회 1,675
15년 전 조회 1,642
15년 전 조회 1,630
15년 전 조회 1,130
15년 전 조회 1,379
15년 전 조회 1,519
15년 전 조회 1,430
15년 전 조회 2,151
15년 전 조회 1,294
15년 전 조회 1,352
15년 전 조회 905
15년 전 조회 1,007
15년 전 조회 977
15년 전 조회 940
15년 전 조회 889
15년 전 조회 954