후이즈검색 소스

<?
$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,333
15년 전 조회 1,367
15년 전 조회 1,618
15년 전 조회 1,112
15년 전 조회 1,475
15년 전 조회 767
15년 전 조회 1,127
15년 전 조회 1,373
15년 전 조회 2,781
15년 전 조회 1,159
15년 전 조회 1,128
15년 전 조회 1,020
15년 전 조회 911
15년 전 조회 911
15년 전 조회 3,510
15년 전 조회 2,876
15년 전 조회 2,058
15년 전 조회 2,506
15년 전 조회 1,590
15년 전 조회 1,143
15년 전 조회 1,136
15년 전 조회 2,422
15년 전 조회 958
15년 전 조회 2,000
15년 전 조회 803
15년 전 조회 1,952
15년 전 조회 885
15년 전 조회 2,557
15년 전 조회 812
15년 전 조회 1,235
15년 전 조회 791
15년 전 조회 2,952
15년 전 조회 1,337
15년 전 조회 1,370
15년 전 조회 1,386
15년 전 조회 1,430
15년 전 조회 1,038
15년 전 조회 1,806
15년 전 조회 1,335
15년 전 조회 914
15년 전 조회 2,782
15년 전 조회 1,168
15년 전 조회 1,365
15년 전 조회 1,162
15년 전 조회 2,011
15년 전 조회 2,023
15년 전 조회 1,678
15년 전 조회 1,030
15년 전 조회 1,271
15년 전 조회 967
15년 전 조회 909
15년 전 조회 1,167
15년 전 조회 2,522
15년 전 조회 2,544
15년 전 조회 1,521
15년 전 조회 1,065
15년 전 조회 1,219
15년 전 조회 1,220
15년 전 조회 1,085
15년 전 조회 983
15년 전 조회 920
15년 전 조회 1,279
15년 전 조회 1,230
15년 전 조회 983
15년 전 조회 951
15년 전 조회 1,135
15년 전 조회 1,590
15년 전 조회 1,120
15년 전 조회 1,447
15년 전 조회 1,286
15년 전 조회 1,957
15년 전 조회 3,019
15년 전 조회 2,363
15년 전 조회 960
15년 전 조회 1,967
15년 전 조회 2,158
15년 전 조회 1,458
15년 전 조회 1,421
15년 전 조회 2,687
15년 전 조회 2,582
15년 전 조회 5,571
15년 전 조회 1,531
15년 전 조회 4,295
15년 전 조회 1,425
15년 전 조회 1,723
15년 전 조회 1,690
15년 전 조회 1,681
15년 전 조회 1,182
15년 전 조회 1,428
15년 전 조회 1,559
15년 전 조회 1,483
15년 전 조회 2,197
15년 전 조회 1,341
15년 전 조회 1,409
15년 전 조회 962
15년 전 조회 1,054
15년 전 조회 1,024
15년 전 조회 975
15년 전 조회 930
15년 전 조회 994