후이즈검색 소스

<?
$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,286
15년 전 조회 1,326
15년 전 조회 1,579
15년 전 조회 1,070
15년 전 조회 1,434
15년 전 조회 726
15년 전 조회 1,073
15년 전 조회 1,337
15년 전 조회 2,742
15년 전 조회 1,111
15년 전 조회 1,087
15년 전 조회 981
15년 전 조회 864
15년 전 조회 874
15년 전 조회 3,467
15년 전 조회 2,841
15년 전 조회 2,018
15년 전 조회 2,459
15년 전 조회 1,548
15년 전 조회 1,097
15년 전 조회 1,094
15년 전 조회 2,376
15년 전 조회 921
15년 전 조회 1,961
15년 전 조회 761
15년 전 조회 1,915
15년 전 조회 846
15년 전 조회 2,518
15년 전 조회 764
15년 전 조회 1,201
15년 전 조회 746
15년 전 조회 2,913
15년 전 조회 1,293
15년 전 조회 1,322
15년 전 조회 1,334
15년 전 조회 1,392
15년 전 조회 1,002
15년 전 조회 1,760
15년 전 조회 1,288
15년 전 조회 875
15년 전 조회 2,732
15년 전 조회 1,117
15년 전 조회 1,319
15년 전 조회 1,121
15년 전 조회 1,967
15년 전 조회 1,980
15년 전 조회 1,633
15년 전 조회 990
15년 전 조회 1,222
15년 전 조회 921
15년 전 조회 865
15년 전 조회 1,119
15년 전 조회 2,471
15년 전 조회 2,503
15년 전 조회 1,478
15년 전 조회 1,020
15년 전 조회 1,174
15년 전 조회 1,183
15년 전 조회 1,046
15년 전 조회 947
15년 전 조회 875
15년 전 조회 1,237
15년 전 조회 1,187
15년 전 조회 933
15년 전 조회 912
15년 전 조회 1,083
15년 전 조회 1,546
15년 전 조회 1,079
15년 전 조회 1,406
15년 전 조회 1,243
15년 전 조회 1,916
15년 전 조회 2,980
15년 전 조회 2,313
15년 전 조회 912
15년 전 조회 1,921
15년 전 조회 2,106
15년 전 조회 1,408
15년 전 조회 1,381
15년 전 조회 2,651
15년 전 조회 2,539
15년 전 조회 5,519
15년 전 조회 1,490
15년 전 조회 4,250
15년 전 조회 1,382
15년 전 조회 1,682
15년 전 조회 1,645
15년 전 조회 1,634
15년 전 조회 1,134
15년 전 조회 1,387
15년 전 조회 1,521
15년 전 조회 1,434
15년 전 조회 2,155
15년 전 조회 1,299
15년 전 조회 1,358
15년 전 조회 912
15년 전 조회 1,012
15년 전 조회 983
15년 전 조회 944
15년 전 조회 892
15년 전 조회 957