후이즈검색 소스

<?
$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,256
15년 전 조회 1,290
15년 전 조회 1,545
15년 전 조회 1,030
15년 전 조회 1,399
15년 전 조회 696
15년 전 조회 1,043
15년 전 조회 1,301
15년 전 조회 2,712
15년 전 조회 1,076
15년 전 조회 1,053
15년 전 조회 956
15년 전 조회 832
15년 전 조회 842
15년 전 조회 3,436
15년 전 조회 2,801
15년 전 조회 1,981
15년 전 조회 2,428
15년 전 조회 1,521
15년 전 조회 1,063
15년 전 조회 1,059
15년 전 조회 2,338
15년 전 조회 885
15년 전 조회 1,925
15년 전 조회 725
15년 전 조회 1,878
15년 전 조회 813
15년 전 조회 2,486
15년 전 조회 731
15년 전 조회 1,165
15년 전 조회 715
15년 전 조회 2,884
15년 전 조회 1,259
15년 전 조회 1,291
15년 전 조회 1,302
15년 전 조회 1,362
15년 전 조회 969
15년 전 조회 1,729
15년 전 조회 1,260
15년 전 조회 841
15년 전 조회 2,700
15년 전 조회 1,090
15년 전 조회 1,285
15년 전 조회 1,086
15년 전 조회 1,937
15년 전 조회 1,948
15년 전 조회 1,602
15년 전 조회 956
15년 전 조회 1,194
15년 전 조회 892
15년 전 조회 838
15년 전 조회 1,084
15년 전 조회 2,443
15년 전 조회 2,467
15년 전 조회 1,440
15년 전 조회 988
15년 전 조회 1,145
15년 전 조회 1,148
15년 전 조회 1,014
15년 전 조회 912
15년 전 조회 846
15년 전 조회 1,203
15년 전 조회 1,157
15년 전 조회 903
15년 전 조회 874
15년 전 조회 1,050
15년 전 조회 1,517
15년 전 조회 1,051
15년 전 조회 1,374
15년 전 조회 1,216
15년 전 조회 1,890
15년 전 조회 2,949
15년 전 조회 2,284
15년 전 조회 884
15년 전 조회 1,891
15년 전 조회 2,077
15년 전 조회 1,381
15년 전 조회 1,354
15년 전 조회 2,617
15년 전 조회 2,506
15년 전 조회 5,491
15년 전 조회 1,457
15년 전 조회 4,222
15년 전 조회 1,352
15년 전 조회 1,646
15년 전 조회 1,611
15년 전 조회 1,605
15년 전 조회 1,106
15년 전 조회 1,355
15년 전 조회 1,496
15년 전 조회 1,400
15년 전 조회 2,129
15년 전 조회 1,271
15년 전 조회 1,329
15년 전 조회 873
15년 전 조회 986
15년 전 조회 948
15년 전 조회 915
15년 전 조회 863
15년 전 조회 924
🐛 버그신고