후이즈검색 소스

<?
$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,362
15년 전 조회 1,385
15년 전 조회 1,652
15년 전 조회 1,141
15년 전 조회 1,500
15년 전 조회 799
15년 전 조회 1,145
15년 전 조회 1,403
15년 전 조회 2,803
15년 전 조회 1,187
15년 전 조회 1,156
15년 전 조회 1,054
15년 전 조회 939
15년 전 조회 938
15년 전 조회 3,539
15년 전 조회 2,906
15년 전 조회 2,085
15년 전 조회 2,528
15년 전 조회 1,615
15년 전 조회 1,178
15년 전 조회 1,167
15년 전 조회 2,448
15년 전 조회 986
15년 전 조회 2,029
15년 전 조회 832
15년 전 조회 1,981
15년 전 조회 918
15년 전 조회 2,589
15년 전 조회 837
15년 전 조회 1,268
15년 전 조회 818
15년 전 조회 2,983
15년 전 조회 1,374
15년 전 조회 1,389
15년 전 조회 1,410
15년 전 조회 1,468
15년 전 조회 1,063
15년 전 조회 1,835
15년 전 조회 1,365
15년 전 조회 945
15년 전 조회 2,818
15년 전 조회 1,199
15년 전 조회 1,394
15년 전 조회 1,187
15년 전 조회 2,042
15년 전 조회 2,051
15년 전 조회 1,698
15년 전 조회 1,060
15년 전 조회 1,298
15년 전 조회 993
15년 전 조회 939
15년 전 조회 1,195
15년 전 조회 2,546
15년 전 조회 2,568
15년 전 조회 1,544
15년 전 조회 1,086
15년 전 조회 1,248
15년 전 조회 1,252
15년 전 조회 1,124
15년 전 조회 1,016
15년 전 조회 953
15년 전 조회 1,310
15년 전 조회 1,265
15년 전 조회 1,019
15년 전 조회 976
15년 전 조회 1,155
15년 전 조회 1,625
15년 전 조회 1,153
15년 전 조회 1,481
15년 전 조회 1,320
15년 전 조회 1,991
15년 전 조회 3,047
15년 전 조회 2,392
15년 전 조회 988
15년 전 조회 1,995
15년 전 조회 2,190
15년 전 조회 1,489
15년 전 조회 1,450
15년 전 조회 2,715
15년 전 조회 2,609
15년 전 조회 5,595
15년 전 조회 1,553
15년 전 조회 4,334
15년 전 조회 1,454
15년 전 조회 1,737
15년 전 조회 1,714
15년 전 조회 1,715
15년 전 조회 1,211
15년 전 조회 1,455
15년 전 조회 1,589
15년 전 조회 1,504
15년 전 조회 2,223
15년 전 조회 1,363
15년 전 조회 1,439
15년 전 조회 982
15년 전 조회 1,073
15년 전 조회 1,055
15년 전 조회 1,010
15년 전 조회 957
15년 전 조회 1,026