후이즈검색 소스

<?
$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,267
15년 전 조회 1,306
15년 전 조회 1,559
15년 전 조회 1,049
15년 전 조회 1,413
15년 전 조회 711
15년 전 조회 1,058
15년 전 조회 1,314
15년 전 조회 2,725
15년 전 조회 1,087
15년 전 조회 1,068
15년 전 조회 969
15년 전 조회 844
15년 전 조회 855
15년 전 조회 3,448
15년 전 조회 2,816
15년 전 조회 1,996
15년 전 조회 2,442
15년 전 조회 1,535
15년 전 조회 1,079
15년 전 조회 1,072
15년 전 조회 2,358
15년 전 조회 897
15년 전 조회 1,940
15년 전 조회 738
15년 전 조회 1,891
15년 전 조회 831
15년 전 조회 2,500
15년 전 조회 748
15년 전 조회 1,179
15년 전 조회 724
15년 전 조회 2,899
15년 전 조회 1,273
15년 전 조회 1,302
15년 전 조회 1,314
15년 전 조회 1,375
15년 전 조회 984
15년 전 조회 1,746
15년 전 조회 1,273
15년 전 조회 853
15년 전 조회 2,718
15년 전 조회 1,105
15년 전 조회 1,301
15년 전 조회 1,099
15년 전 조회 1,952
15년 전 조회 1,960
15년 전 조회 1,613
15년 전 조회 968
15년 전 조회 1,207
15년 전 조회 904
15년 전 조회 850
15년 전 조회 1,101
15년 전 조회 2,459
15년 전 조회 2,479
15년 전 조회 1,455
15년 전 조회 1,005
15년 전 조회 1,161
15년 전 조회 1,158
15년 전 조회 1,030
15년 전 조회 929
15년 전 조회 857
15년 전 조회 1,217
15년 전 조회 1,173
15년 전 조회 917
15년 전 조회 893
15년 전 조회 1,064
15년 전 조회 1,531
15년 전 조회 1,061
15년 전 조회 1,388
15년 전 조회 1,228
15년 전 조회 1,902
15년 전 조회 2,962
15년 전 조회 2,298
15년 전 조회 894
15년 전 조회 1,904
15년 전 조회 2,092
15년 전 조회 1,395
15년 전 조회 1,368
15년 전 조회 2,635
15년 전 조회 2,520
15년 전 조회 5,504
15년 전 조회 1,474
15년 전 조회 4,236
15년 전 조회 1,364
15년 전 조회 1,664
15년 전 조회 1,626
15년 전 조회 1,620
15년 전 조회 1,121
15년 전 조회 1,366
15년 전 조회 1,509
15년 전 조회 1,412
15년 전 조회 2,140
15년 전 조회 1,286
15년 전 조회 1,343
15년 전 조회 891
15년 전 조회 1,000
15년 전 조회 961
15년 전 조회 928
15년 전 조회 876
15년 전 조회 940
🐛 버그신고