후이즈검색 소스

· 15년 전 · 1148
<?
$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,510
15년 전 조회 1,541
15년 전 조회 1,799
15년 전 조회 1,295
15년 전 조회 1,667
15년 전 조회 936
15년 전 조회 1,299
15년 전 조회 1,570
15년 전 조회 2,950
15년 전 조회 1,344
15년 전 조회 1,319
15년 전 조회 1,192
15년 전 조회 1,091
15년 전 조회 1,091
15년 전 조회 3,695
15년 전 조회 3,075
15년 전 조회 2,243
15년 전 조회 2,681
15년 전 조회 1,782
15년 전 조회 1,319
15년 전 조회 1,314
15년 전 조회 2,614
15년 전 조회 1,145
15년 전 조회 2,200
15년 전 조회 995
15년 전 조회 2,145
15년 전 조회 1,083
15년 전 조회 2,756
15년 전 조회 1,005
15년 전 조회 1,428
15년 전 조회 981
15년 전 조회 3,224
15년 전 조회 1,561
15년 전 조회 1,572
15년 전 조회 1,595
15년 전 조회 1,654
15년 전 조회 1,244
15년 전 조회 2,004
15년 전 조회 1,549
15년 전 조회 1,127
15년 전 조회 3,003
15년 전 조회 1,364
15년 전 조회 1,580
15년 전 조회 1,356
15년 전 조회 2,215
15년 전 조회 2,235
15년 전 조회 1,879
15년 전 조회 1,245
15년 전 조회 1,485
15년 전 조회 1,149
15년 전 조회 1,118
15년 전 조회 1,365
15년 전 조회 2,739
15년 전 조회 2,757
15년 전 조회 1,737
15년 전 조회 1,264
15년 전 조회 1,430
15년 전 조회 1,415
15년 전 조회 1,321
15년 전 조회 1,189
15년 전 조회 1,119
15년 전 조회 1,477
15년 전 조회 1,430
15년 전 조회 1,199
15년 전 조회 1,162
15년 전 조회 1,333
15년 전 조회 1,804
15년 전 조회 1,338
15년 전 조회 1,654
15년 전 조회 1,487
15년 전 조회 2,213
15년 전 조회 3,225
15년 전 조회 2,580
15년 전 조회 1,152
15년 전 조회 2,162
15년 전 조회 2,368
15년 전 조회 1,666
15년 전 조회 1,627
15년 전 조회 2,906
15년 전 조회 2,823
15년 전 조회 5,823
15년 전 조회 1,752
15년 전 조회 4,553
15년 전 조회 1,645
15년 전 조회 1,909
15년 전 조회 1,897
15년 전 조회 1,887
15년 전 조회 1,378
15년 전 조회 1,621
15년 전 조회 1,774
15년 전 조회 1,678
15년 전 조회 2,390
15년 전 조회 1,554
15년 전 조회 1,676
15년 전 조회 1,151
15년 전 조회 1,253
15년 전 조회 1,238
15년 전 조회 1,198
15년 전 조회 1,141
15년 전 조회 1,189