후이즈검색 소스

<?
$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,317
15년 전 조회 1,357
15년 전 조회 1,608
15년 전 조회 1,091
15년 전 조회 1,458
15년 전 조회 754
15년 전 조회 1,113
15년 전 조회 1,364
15년 전 조회 2,773
15년 전 조회 1,147
15년 전 조회 1,117
15년 전 조회 1,010
15년 전 조회 898
15년 전 조회 899
15년 전 조회 3,496
15년 전 조회 2,868
15년 전 조회 2,045
15년 전 조회 2,489
15년 전 조회 1,581
15년 전 조회 1,129
15년 전 조회 1,121
15년 전 조회 2,409
15년 전 조회 953
15년 전 조회 1,992
15년 전 조회 794
15년 전 조회 1,937
15년 전 조회 872
15년 전 조회 2,546
15년 전 조회 788
15년 전 조회 1,225
15년 전 조회 775
15년 전 조회 2,948
15년 전 조회 1,326
15년 전 조회 1,361
15년 전 조회 1,371
15년 전 조회 1,420
15년 전 조회 1,028
15년 전 조회 1,795
15년 전 조회 1,323
15년 전 조회 902
15년 전 조회 2,770
15년 전 조회 1,149
15년 전 조회 1,350
15년 전 조회 1,148
15년 전 조회 1,999
15년 전 조회 2,014
15년 전 조회 1,667
15년 전 조회 1,020
15년 전 조회 1,258
15년 전 조회 953
15년 전 조회 895
15년 전 조회 1,156
15년 전 조회 2,508
15년 전 조회 2,534
15년 전 조회 1,514
15년 전 조회 1,052
15년 전 조회 1,205
15년 전 조회 1,209
15년 전 조회 1,073
15년 전 조회 973
15년 전 조회 907
15년 전 조회 1,268
15년 전 조회 1,219
15년 전 조회 968
15년 전 조회 937
15년 전 조회 1,123
15년 전 조회 1,575
15년 전 조회 1,109
15년 전 조회 1,438
15년 전 조회 1,275
15년 전 조회 1,946
15년 전 조회 3,008
15년 전 조회 2,348
15년 전 조회 946
15년 전 조회 1,957
15년 전 조회 2,137
15년 전 조회 1,439
15년 전 조회 1,412
15년 전 조회 2,676
15년 전 조회 2,568
15년 전 조회 5,549
15년 전 조회 1,519
15년 전 조회 4,285
15년 전 조회 1,412
15년 전 조회 1,710
15년 전 조회 1,676
15년 전 조회 1,672
15년 전 조회 1,169
15년 전 조회 1,412
15년 전 조회 1,550
15년 전 조회 1,466
15년 전 조회 2,180
15년 전 조회 1,331
15년 전 조회 1,394
15년 전 조회 944
15년 전 조회 1,043
15년 전 조회 1,008
15년 전 조회 966
15년 전 조회 922
15년 전 조회 982