후이즈검색 소스

<?
$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,325
15년 전 조회 1,362
15년 전 조회 1,612
15년 전 조회 1,100
15년 전 조회 1,465
15년 전 조회 757
15년 전 조회 1,117
15년 전 조회 1,366
15년 전 조회 2,777
15년 전 조회 1,152
15년 전 조회 1,121
15년 전 조회 1,014
15년 전 조회 904
15년 전 조회 903
15년 전 조회 3,504
15년 전 조회 2,872
15년 전 조회 2,050
15년 전 조회 2,498
15년 전 조회 1,584
15년 전 조회 1,133
15년 전 조회 1,131
15년 전 조회 2,413
15년 전 조회 956
15년 전 조회 1,996
15년 전 조회 799
15년 전 조회 1,944
15년 전 조회 881
15년 전 조회 2,552
15년 전 조회 794
15년 전 조회 1,228
15년 전 조회 781
15년 전 조회 2,952
15년 전 조회 1,333
15년 전 조회 1,365
15년 전 조회 1,376
15년 전 조회 1,423
15년 전 조회 1,033
15년 전 조회 1,798
15년 전 조회 1,331
15년 전 조회 907
15년 전 조회 2,773
15년 전 조회 1,156
15년 전 조회 1,356
15년 전 조회 1,155
15년 전 조회 2,005
15년 전 조회 2,019
15년 전 조회 1,673
15년 전 조회 1,021
15년 전 조회 1,265
15년 전 조회 960
15년 전 조회 899
15년 전 조회 1,163
15년 전 조회 2,514
15년 전 조회 2,539
15년 전 조회 1,515
15년 전 조회 1,061
15년 전 조회 1,210
15년 전 조회 1,216
15년 전 조회 1,077
15년 전 조회 977
15년 전 조회 914
15년 전 조회 1,276
15년 전 조회 1,223
15년 전 조회 974
15년 전 조회 945
15년 전 조회 1,127
15년 전 조회 1,582
15년 전 조회 1,115
15년 전 조회 1,441
15년 전 조회 1,277
15년 전 조회 1,948
15년 전 조회 3,015
15년 전 조회 2,352
15년 전 조회 951
15년 전 조회 1,962
15년 전 조회 2,150
15년 전 조회 1,447
15년 전 조회 1,421
15년 전 조회 2,679
15년 전 조회 2,575
15년 전 조회 5,560
15년 전 조회 1,522
15년 전 조회 4,290
15년 전 조회 1,419
15년 전 조회 1,713
15년 전 조회 1,681
15년 전 조회 1,677
15년 전 조회 1,172
15년 전 조회 1,420
15년 전 조회 1,551
15년 전 조회 1,474
15년 전 조회 2,184
15년 전 조회 1,335
15년 전 조회 1,401
15년 전 조회 948
15년 전 조회 1,051
15년 전 조회 1,014
15년 전 조회 969
15년 전 조회 925
15년 전 조회 985