후이즈검색 소스

<?
$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,276
15년 전 조회 1,310
15년 전 조회 1,563
15년 전 조회 1,053
15년 전 조회 1,420
15년 전 조회 717
15년 전 조회 1,061
15년 전 조회 1,321
15년 전 조회 2,730
15년 전 조회 1,092
15년 전 조회 1,073
15년 전 조회 973
15년 전 조회 849
15년 전 조회 862
15년 전 조회 3,450
15년 전 조회 2,820
15년 전 조회 1,998
15년 전 조회 2,446
15년 전 조회 1,535
15년 전 조회 1,084
15년 전 조회 1,080
15년 전 조회 2,362
15년 전 조회 905
15년 전 조회 1,947
15년 전 조회 746
15년 전 조회 1,896
15년 전 조회 833
15년 전 조회 2,502
15년 전 조회 755
15년 전 조회 1,184
15년 전 조회 731
15년 전 조회 2,903
15년 전 조회 1,277
15년 전 조회 1,308
15년 전 조회 1,318
15년 전 조회 1,380
15년 전 조회 988
15년 전 조회 1,750
15년 전 조회 1,276
15년 전 조회 858
15년 전 조회 2,721
15년 전 조회 1,107
15년 전 조회 1,302
15년 전 조회 1,104
15년 전 조회 1,953
15년 전 조회 1,966
15년 전 조회 1,617
15년 전 조회 974
15년 전 조회 1,213
15년 전 조회 907
15년 전 조회 853
15년 전 조회 1,105
15년 전 조회 2,464
15년 전 조회 2,484
15년 전 조회 1,461
15년 전 조회 1,009
15년 전 조회 1,165
15년 전 조회 1,165
15년 전 조회 1,034
15년 전 조회 931
15년 전 조회 862
15년 전 조회 1,225
15년 전 조회 1,174
15년 전 조회 922
15년 전 조회 897
15년 전 조회 1,070
15년 전 조회 1,536
15년 전 조회 1,066
15년 전 조회 1,391
15년 전 조회 1,231
15년 전 조회 1,907
15년 전 조회 2,968
15년 전 조회 2,302
15년 전 조회 897
15년 전 조회 1,910
15년 전 조회 2,099
15년 전 조회 1,401
15년 전 조회 1,369
15년 전 조회 2,639
15년 전 조회 2,523
15년 전 조회 5,508
15년 전 조회 1,476
15년 전 조회 4,240
15년 전 조회 1,368
15년 전 조회 1,666
15년 전 조회 1,634
15년 전 조회 1,622
15년 전 조회 1,124
15년 전 조회 1,373
15년 전 조회 1,511
15년 전 조회 1,421
15년 전 조회 2,146
15년 전 조회 1,288
15년 전 조회 1,348
15년 전 조회 894
15년 전 조회 1,002
15년 전 조회 970
15년 전 조회 932
15년 전 조회 884
15년 전 조회 944