후이즈검색 소스

<?
$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,271
15년 전 조회 1,307
15년 전 조회 1,561
15년 전 조회 1,052
15년 전 조회 1,416
15년 전 조회 716
15년 전 조회 1,058
15년 전 조회 1,318
15년 전 조회 2,727
15년 전 조회 1,090
15년 전 조회 1,069
15년 전 조회 972
15년 전 조회 846
15년 전 조회 859
15년 전 조회 3,449
15년 전 조회 2,819
15년 전 조회 1,997
15년 전 조회 2,443
15년 전 조회 1,535
15년 전 조회 1,083
15년 전 조회 1,078
15년 전 조회 2,359
15년 전 조회 904
15년 전 조회 1,944
15년 전 조회 743
15년 전 조회 1,895
15년 전 조회 831
15년 전 조회 2,502
15년 전 조회 753
15년 전 조회 1,184
15년 전 조회 731
15년 전 조회 2,903
15년 전 조회 1,275
15년 전 조회 1,306
15년 전 조회 1,317
15년 전 조회 1,379
15년 전 조회 986
15년 전 조회 1,749
15년 전 조회 1,276
15년 전 조회 857
15년 전 조회 2,720
15년 전 조회 1,106
15년 전 조회 1,302
15년 전 조회 1,103
15년 전 조회 1,953
15년 전 조회 1,963
15년 전 조회 1,616
15년 전 조회 973
15년 전 조회 1,211
15년 전 조회 906
15년 전 조회 852
15년 전 조회 1,103
15년 전 조회 2,460
15년 전 조회 2,483
15년 전 조회 1,459
15년 전 조회 1,006
15년 전 조회 1,162
15년 전 조회 1,164
15년 전 조회 1,032
15년 전 조회 930
15년 전 조회 861
15년 전 조회 1,222
15년 전 조회 1,174
15년 전 조회 920
15년 전 조회 895
15년 전 조회 1,067
15년 전 조회 1,535
15년 전 조회 1,065
15년 전 조회 1,389
15년 전 조회 1,231
15년 전 조회 1,905
15년 전 조회 2,966
15년 전 조회 2,301
15년 전 조회 896
15년 전 조회 1,909
15년 전 조회 2,097
15년 전 조회 1,399
15년 전 조회 1,369
15년 전 조회 2,638
15년 전 조회 2,523
15년 전 조회 5,507
15년 전 조회 1,476
15년 전 조회 4,239
15년 전 조회 1,366
15년 전 조회 1,666
15년 전 조회 1,631
15년 전 조회 1,621
15년 전 조회 1,123
15년 전 조회 1,371
15년 전 조회 1,511
15년 전 조회 1,420
15년 전 조회 2,144
15년 전 조회 1,288
15년 전 조회 1,346
15년 전 조회 893
15년 전 조회 1,001
15년 전 조회 969
15년 전 조회 931
15년 전 조회 881
15년 전 조회 944