후이즈검색 소스

<?
$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,305
15년 전 조회 1,344
15년 전 조회 1,593
15년 전 조회 1,077
15년 전 조회 1,447
15년 전 조회 736
15년 전 조회 1,096
15년 전 조회 1,349
15년 전 조회 2,764
15년 전 조회 1,131
15년 전 조회 1,103
15년 전 조회 995
15년 전 조회 878
15년 전 조회 887
15년 전 조회 3,480
15년 전 조회 2,858
15년 전 조회 2,032
15년 전 조회 2,479
15년 전 조회 1,562
15년 전 조회 1,110
15년 전 조회 1,108
15년 전 조회 2,394
15년 전 조회 935
15년 전 조회 1,979
15년 전 조회 775
15년 전 조회 1,922
15년 전 조회 858
15년 전 조회 2,531
15년 전 조회 770
15년 전 조회 1,215
15년 전 조회 760
15년 전 조회 2,931
15년 전 조회 1,311
15년 전 조회 1,343
15년 전 조회 1,354
15년 전 조회 1,405
15년 전 조회 1,017
15년 전 조회 1,782
15년 전 조회 1,306
15년 전 조회 886
15년 전 조회 2,749
15년 전 조회 1,131
15년 전 조회 1,336
15년 전 조회 1,134
15년 전 조회 1,988
15년 전 조회 2,000
15년 전 조회 1,651
15년 전 조회 1,010
15년 전 조회 1,242
15년 전 조회 937
15년 전 조회 883
15년 전 조회 1,141
15년 전 조회 2,486
15년 전 조회 2,520
15년 전 조회 1,498
15년 전 조회 1,032
15년 전 조회 1,191
15년 전 조회 1,193
15년 전 조회 1,062
15년 전 조회 962
15년 전 조회 889
15년 전 조회 1,252
15년 전 조회 1,201
15년 전 조회 950
15년 전 조회 928
15년 전 조회 1,108
15년 전 조회 1,563
15년 전 조회 1,096
15년 전 조회 1,423
15년 전 조회 1,259
15년 전 조회 1,929
15년 전 조회 2,993
15년 전 조회 2,334
15년 전 조회 933
15년 전 조회 1,941
15년 전 조회 2,122
15년 전 조회 1,427
15년 전 조회 1,395
15년 전 조회 2,663
15년 전 조회 2,555
15년 전 조회 5,536
15년 전 조회 1,505
15년 전 조회 4,265
15년 전 조회 1,397
15년 전 조회 1,698
15년 전 조회 1,660
15년 전 조회 1,653
15년 전 조회 1,153
15년 전 조회 1,397
15년 전 조회 1,537
15년 전 조회 1,454
15년 전 조회 2,168
15년 전 조회 1,319
15년 전 조회 1,378
15년 전 조회 927
15년 전 조회 1,029
15년 전 조회 998
15년 전 조회 955
15년 전 조회 909
15년 전 조회 966