후이즈검색 소스

<?
$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,262
15년 전 조회 1,297
15년 전 조회 1,555
15년 전 조회 1,041
15년 전 조회 1,408
15년 전 조회 707
15년 전 조회 1,050
15년 전 조회 1,309
15년 전 조회 2,719
15년 전 조회 1,084
15년 전 조회 1,063
15년 전 조회 966
15년 전 조회 838
15년 전 조회 849
15년 전 조회 3,444
15년 전 조회 2,809
15년 전 조회 1,989
15년 전 조회 2,433
15년 전 조회 1,526
15년 전 조회 1,074
15년 전 조회 1,070
15년 전 조회 2,350
15년 전 조회 892
15년 전 조회 1,935
15년 전 조회 733
15년 전 조회 1,887
15년 전 조회 825
15년 전 조회 2,494
15년 전 조회 741
15년 전 조회 1,174
15년 전 조회 719
15년 전 조회 2,895
15년 전 조회 1,268
15년 전 조회 1,297
15년 전 조회 1,310
15년 전 조회 1,369
15년 전 조회 981
15년 전 조회 1,740
15년 전 조회 1,270
15년 전 조회 851
15년 전 조회 2,714
15년 전 조회 1,096
15년 전 조회 1,295
15년 전 조회 1,093
15년 전 조회 1,946
15년 전 조회 1,956
15년 전 조회 1,609
15년 전 조회 963
15년 전 조회 1,200
15년 전 조회 896
15년 전 조회 847
15년 전 조회 1,092
15년 전 조회 2,452
15년 전 조회 2,475
15년 전 조회 1,450
15년 전 조회 999
15년 전 조회 1,152
15년 전 조회 1,154
15년 전 조회 1,025
15년 전 조회 922
15년 전 조회 851
15년 전 조회 1,214
15년 전 조회 1,164
15년 전 조회 911
15년 전 조회 883
15년 전 조회 1,060
15년 전 조회 1,526
15년 전 조회 1,057
15년 전 조회 1,382
15년 전 조회 1,224
15년 전 조회 1,895
15년 전 조회 2,956
15년 전 조회 2,293
15년 전 조회 888
15년 전 조회 1,901
15년 전 조회 2,085
15년 전 조회 1,387
15년 전 조회 1,363
15년 전 조회 2,630
15년 전 조회 2,515
15년 전 조회 5,501
15년 전 조회 1,469
15년 전 조회 4,228
15년 전 조회 1,360
15년 전 조회 1,656
15년 전 조회 1,622
15년 전 조회 1,613
15년 전 조회 1,115
15년 전 조회 1,363
15년 전 조회 1,506
15년 전 조회 1,408
15년 전 조회 2,136
15년 전 조회 1,280
15년 전 조회 1,339
15년 전 조회 883
15년 전 조회 994
15년 전 조회 958
15년 전 조회 922
15년 전 조회 870
15년 전 조회 935
🐛 버그신고