후이즈검색 소스

<?
$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,304
15년 전 조회 1,559
15년 전 조회 1,048
15년 전 조회 1,413
15년 전 조회 710
15년 전 조회 1,055
15년 전 조회 1,312
15년 전 조회 2,723
15년 전 조회 1,087
15년 전 조회 1,067
15년 전 조회 968
15년 전 조회 841
15년 전 조회 855
15년 전 조회 3,448
15년 전 조회 2,814
15년 전 조회 1,995
15년 전 조회 2,441
15년 전 조회 1,533
15년 전 조회 1,078
15년 전 조회 1,072
15년 전 조회 2,357
15년 전 조회 896
15년 전 조회 1,940
15년 전 조회 737
15년 전 조회 1,889
15년 전 조회 828
15년 전 조회 2,497
15년 전 조회 744
15년 전 조회 1,178
15년 전 조회 724
15년 전 조회 2,896
15년 전 조회 1,271
15년 전 조회 1,302
15년 전 조회 1,311
15년 전 조회 1,372
15년 전 조회 982
15년 전 조회 1,744
15년 전 조회 1,273
15년 전 조회 853
15년 전 조회 2,717
15년 전 조회 1,103
15년 전 조회 1,300
15년 전 조회 1,098
15년 전 조회 1,952
15년 전 조회 1,960
15년 전 조회 1,611
15년 전 조회 966
15년 전 조회 1,206
15년 전 조회 900
15년 전 조회 849
15년 전 조회 1,100
15년 전 조회 2,457
15년 전 조회 2,479
15년 전 조회 1,454
15년 전 조회 1,003
15년 전 조회 1,160
15년 전 조회 1,157
15년 전 조회 1,028
15년 전 조회 928
15년 전 조회 855
15년 전 조회 1,217
15년 전 조회 1,170
15년 전 조회 917
15년 전 조회 892
15년 전 조회 1,063
15년 전 조회 1,530
15년 전 조회 1,060
15년 전 조회 1,386
15년 전 조회 1,227
15년 전 조회 1,901
15년 전 조회 2,960
15년 전 조회 2,297
15년 전 조회 893
15년 전 조회 1,902
15년 전 조회 2,090
15년 전 조회 1,393
15년 전 조회 1,367
15년 전 조회 2,635
15년 전 조회 2,519
15년 전 조회 5,504
15년 전 조회 1,473
15년 전 조회 4,236
15년 전 조회 1,364
15년 전 조회 1,664
15년 전 조회 1,626
15년 전 조회 1,616
15년 전 조회 1,119
15년 전 조회 1,365
15년 전 조회 1,508
15년 전 조회 1,411
15년 전 조회 2,139
15년 전 조회 1,283
15년 전 조회 1,342
15년 전 조회 887
15년 전 조회 998
15년 전 조회 960
15년 전 조회 924
15년 전 조회 875
15년 전 조회 939
🐛 버그신고