후이즈검색 소스

<?
$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,310
15년 전 조회 1,349
15년 전 조회 1,600
15년 전 조회 1,081
15년 전 조회 1,450
15년 전 조회 742
15년 전 조회 1,102
15년 전 조회 1,353
15년 전 조회 2,765
15년 전 조회 1,137
15년 전 조회 1,112
15년 전 조회 999
15년 전 조회 887
15년 전 조회 894
15년 전 조회 3,487
15년 전 조회 2,860
15년 전 조회 2,034
15년 전 조회 2,485
15년 전 조회 1,568
15년 전 조회 1,116
15년 전 조회 1,112
15년 전 조회 2,401
15년 전 조회 938
15년 전 조회 1,983
15년 전 조회 783
15년 전 조회 1,927
15년 전 조회 864
15년 전 조회 2,536
15년 전 조회 775
15년 전 조회 1,218
15년 전 조회 767
15년 전 조회 2,936
15년 전 조회 1,316
15년 전 조회 1,351
15년 전 조회 1,361
15년 전 조회 1,409
15년 전 조회 1,020
15년 전 조회 1,787
15년 전 조회 1,312
15년 전 조회 894
15년 전 조회 2,757
15년 전 조회 1,138
15년 전 조회 1,344
15년 전 조회 1,139
15년 전 조회 1,992
15년 전 조회 2,006
15년 전 조회 1,656
15년 전 조회 1,014
15년 전 조회 1,247
15년 전 조회 945
15년 전 조회 891
15년 전 조회 1,144
15년 전 조회 2,497
15년 전 조회 2,528
15년 전 조회 1,501
15년 전 조회 1,043
15년 전 조회 1,199
15년 전 조회 1,199
15년 전 조회 1,068
15년 전 조회 967
15년 전 조회 897
15년 전 조회 1,261
15년 전 조회 1,208
15년 전 조회 957
15년 전 조회 933
15년 전 조회 1,112
15년 전 조회 1,567
15년 전 조회 1,103
15년 전 조회 1,430
15년 전 조회 1,264
15년 전 조회 1,938
15년 전 조회 2,998
15년 전 조회 2,337
15년 전 조회 938
15년 전 조회 1,949
15년 전 조회 2,131
15년 전 조회 1,432
15년 전 조회 1,401
15년 전 조회 2,666
15년 전 조회 2,564
15년 전 조회 5,545
15년 전 조회 1,509
15년 전 조회 4,272
15년 전 조회 1,404
15년 전 조회 1,703
15년 전 조회 1,671
15년 전 조회 1,660
15년 전 조회 1,160
15년 전 조회 1,402
15년 전 조회 1,542
15년 전 조회 1,460
15년 전 조회 2,174
15년 전 조회 1,324
15년 전 조회 1,388
15년 전 조회 928
15년 전 조회 1,038
15년 전 조회 1,001
15년 전 조회 961
15년 전 조회 916
15년 전 조회 969