후이즈검색 소스

<?
$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,264
15년 전 조회 1,301
15년 전 조회 1,557
15년 전 조회 1,041
15년 전 조회 1,410
15년 전 조회 707
15년 전 조회 1,052
15년 전 조회 1,310
15년 전 조회 2,720
15년 전 조회 1,085
15년 전 조회 1,064
15년 전 조회 968
15년 전 조회 840
15년 전 조회 850
15년 전 조회 3,444
15년 전 조회 2,810
15년 전 조회 1,992
15년 전 조회 2,436
15년 전 조회 1,528
15년 전 조회 1,076
15년 전 조회 1,070
15년 전 조회 2,354
15년 전 조회 893
15년 전 조회 1,936
15년 전 조회 733
15년 전 조회 1,887
15년 전 조회 826
15년 전 조회 2,494
15년 전 조회 743
15년 전 조회 1,174
15년 전 조회 720
15년 전 조회 2,896
15년 전 조회 1,269
15년 전 조회 1,298
15년 전 조회 1,310
15년 전 조회 1,371
15년 전 조회 981
15년 전 조회 1,740
15년 전 조회 1,271
15년 전 조회 852
15년 전 조회 2,715
15년 전 조회 1,099
15년 전 조회 1,295
15년 전 조회 1,093
15년 전 조회 1,949
15년 전 조회 1,958
15년 전 조회 1,610
15년 전 조회 965
15년 전 조회 1,201
15년 전 조회 898
15년 전 조회 847
15년 전 조회 1,096
15년 전 조회 2,454
15년 전 조회 2,475
15년 전 조회 1,451
15년 전 조회 999
15년 전 조회 1,154
15년 전 조회 1,155
15년 전 조회 1,026
15년 전 조회 926
15년 전 조회 852
15년 전 조회 1,214
15년 전 조회 1,168
15년 전 조회 915
15년 전 조회 884
15년 전 조회 1,062
15년 전 조회 1,528
15년 전 조회 1,057
15년 전 조회 1,384
15년 전 조회 1,225
15년 전 조회 1,898
15년 전 조회 2,958
15년 전 조회 2,294
15년 전 조회 889
15년 전 조회 1,902
15년 전 조회 2,085
15년 전 조회 1,390
15년 전 조회 1,363
15년 전 조회 2,630
15년 전 조회 2,516
15년 전 조회 5,501
15년 전 조회 1,471
15년 전 조회 4,231
15년 전 조회 1,363
15년 전 조회 1,657
15년 전 조회 1,624
15년 전 조회 1,614
15년 전 조회 1,116
15년 전 조회 1,363
15년 전 조회 1,507
15년 전 조회 1,408
15년 전 조회 2,136
15년 전 조회 1,281
15년 전 조회 1,341
15년 전 조회 886
15년 전 조회 996
15년 전 조회 958
15년 전 조회 923
15년 전 조회 870
15년 전 조회 935
🐛 버그신고