후이즈검색 소스

<?
$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,277
15년 전 조회 1,314
15년 전 조회 1,568
15년 전 조회 1,056
15년 전 조회 1,422
15년 전 조회 719
15년 전 조회 1,063
15년 전 조회 1,323
15년 전 조회 2,732
15년 전 조회 1,097
15년 전 조회 1,074
15년 전 조회 975
15년 전 조회 854
15년 전 조회 865
15년 전 조회 3,453
15년 전 조회 2,827
15년 전 조회 2,001
15년 전 조회 2,450
15년 전 조회 1,536
15년 전 조회 1,086
15년 전 조회 1,083
15년 전 조회 2,366
15년 전 조회 909
15년 전 조회 1,951
15년 전 조회 750
15년 전 조회 1,900
15년 전 조회 838
15년 전 조회 2,509
15년 전 조회 757
15년 전 조회 1,189
15년 전 조회 737
15년 전 조회 2,904
15년 전 조회 1,279
15년 전 조회 1,312
15년 전 조회 1,320
15년 전 조회 1,386
15년 전 조회 990
15년 전 조회 1,752
15년 전 조회 1,279
15년 전 조회 861
15년 전 조회 2,722
15년 전 조회 1,109
15년 전 조회 1,307
15년 전 조회 1,106
15년 전 조회 1,958
15년 전 조회 1,969
15년 전 조회 1,621
15년 전 조회 980
15년 전 조회 1,216
15년 전 조회 910
15년 전 조회 856
15년 전 조회 1,108
15년 전 조회 2,466
15년 전 조회 2,487
15년 전 조회 1,465
15년 전 조회 1,010
15년 전 조회 1,166
15년 전 조회 1,170
15년 전 조회 1,038
15년 전 조회 933
15년 전 조회 865
15년 전 조회 1,227
15년 전 조회 1,179
15년 전 조회 924
15년 전 조회 902
15년 전 조회 1,072
15년 전 조회 1,539
15년 전 조회 1,068
15년 전 조회 1,398
15년 전 조회 1,234
15년 전 조회 1,908
15년 전 조회 2,971
15년 전 조회 2,305
15년 전 조회 900
15년 전 조회 1,914
15년 전 조회 2,099
15년 전 조회 1,402
15년 전 조회 1,372
15년 전 조회 2,640
15년 전 조회 2,526
15년 전 조회 5,511
15년 전 조회 1,479
15년 전 조회 4,242
15년 전 조회 1,371
15년 전 조회 1,669
15년 전 조회 1,637
15년 전 조회 1,628
15년 전 조회 1,126
15년 전 조회 1,376
15년 전 조회 1,516
15년 전 조회 1,426
15년 전 조회 2,148
15년 전 조회 1,291
15년 전 조회 1,349
15년 전 조회 898
15년 전 조회 1,003
15년 전 조회 973
15년 전 조회 935
15년 전 조회 885
15년 전 조회 947