후이즈검색 소스

<?
$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,270
15년 전 조회 1,306
15년 전 조회 1,561
15년 전 조회 1,050
15년 전 조회 1,415
15년 전 조회 715
15년 전 조회 1,058
15년 전 조회 1,316
15년 전 조회 2,726
15년 전 조회 1,090
15년 전 조회 1,069
15년 전 조회 971
15년 전 조회 844
15년 전 조회 859
15년 전 조회 3,448
15년 전 조회 2,817
15년 전 조회 1,996
15년 전 조회 2,443
15년 전 조회 1,535
15년 전 조회 1,082
15년 전 조회 1,076
15년 전 조회 2,358
15년 전 조회 899
15년 전 조회 1,941
15년 전 조회 740
15년 전 조회 1,894
15년 전 조회 831
15년 전 조회 2,502
15년 전 조회 752
15년 전 조회 1,183
15년 전 조회 731
15년 전 조회 2,902
15년 전 조회 1,274
15년 전 조회 1,305
15년 전 조회 1,316
15년 전 조회 1,377
15년 전 조회 985
15년 전 조회 1,747
15년 전 조회 1,276
15년 전 조회 854
15년 전 조회 2,719
15년 전 조회 1,106
15년 전 조회 1,302
15년 전 조회 1,102
15년 전 조회 1,953
15년 전 조회 1,962
15년 전 조회 1,616
15년 전 조회 972
15년 전 조회 1,210
15년 전 조회 905
15년 전 조회 851
15년 전 조회 1,103
15년 전 조회 2,460
15년 전 조회 2,480
15년 전 조회 1,457
15년 전 조회 1,005
15년 전 조회 1,162
15년 전 조회 1,160
15년 전 조회 1,031
15년 전 조회 930
15년 전 조회 859
15년 전 조회 1,222
15년 전 조회 1,174
15년 전 조회 920
15년 전 조회 893
15년 전 조회 1,067
15년 전 조회 1,535
15년 전 조회 1,063
15년 전 조회 1,389
15년 전 조회 1,229
15년 전 조회 1,904
15년 전 조회 2,964
15년 전 조회 2,300
15년 전 조회 896
15년 전 조회 1,908
15년 전 조회 2,096
15년 전 조회 1,398
15년 전 조회 1,368
15년 전 조회 2,637
15년 전 조회 2,523
15년 전 조회 5,506
15년 전 조회 1,476
15년 전 조회 4,238
15년 전 조회 1,366
15년 전 조회 1,665
15년 전 조회 1,630
15년 전 조회 1,620
15년 전 조회 1,123
15년 전 조회 1,369
15년 전 조회 1,510
15년 전 조회 1,416
15년 전 조회 2,141
15년 전 조회 1,288
15년 전 조회 1,346
15년 전 조회 892
15년 전 조회 1,001
15년 전 조회 966
15년 전 조회 930
15년 전 조회 880
15년 전 조회 942
🐛 버그신고