후이즈검색 소스

· 15년 전 · 1472
<?
$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,810
15년 전 조회 1,851
15년 전 조회 2,105
15년 전 조회 1,608
15년 전 조회 1,956
15년 전 조회 1,246
15년 전 조회 1,596
15년 전 조회 1,896
15년 전 조회 3,277
15년 전 조회 1,641
15년 전 조회 1,627
15년 전 조회 1,507
15년 전 조회 1,388
15년 전 조회 1,403
15년 전 조회 3,992
15년 전 조회 3,391
15년 전 조회 2,543
15년 전 조회 2,984
15년 전 조회 2,090
15년 전 조회 1,628
15년 전 조회 1,635
15년 전 조회 2,958
15년 전 조회 1,474
15년 전 조회 2,523
15년 전 조회 1,314
15년 전 조회 2,459
15년 전 조회 1,396
15년 전 조회 3,079
15년 전 조회 1,327
15년 전 조회 1,777
15년 전 조회 1,313
15년 전 조회 3,519
15년 전 조회 1,882
15년 전 조회 1,908
15년 전 조회 1,917
15년 전 조회 1,974
15년 전 조회 1,571
15년 전 조회 2,328
15년 전 조회 1,844
15년 전 조회 1,473
15년 전 조회 3,335
15년 전 조회 1,701
15년 전 조회 1,903
15년 전 조회 1,662
15년 전 조회 2,535
15년 전 조회 2,559
15년 전 조회 2,190
15년 전 조회 1,564
15년 전 조회 1,824
15년 전 조회 1,473
15년 전 조회 1,443
15년 전 조회 1,700
15년 전 조회 3,061
15년 전 조회 3,092
15년 전 조회 2,064
15년 전 조회 1,563
15년 전 조회 1,746
15년 전 조회 1,762
15년 전 조회 1,635
15년 전 조회 1,537
15년 전 조회 1,447
15년 전 조회 1,809
15년 전 조회 1,765
15년 전 조회 1,543
15년 전 조회 1,493
15년 전 조회 1,661
15년 전 조회 2,142
15년 전 조회 1,652
15년 전 조회 1,982
15년 전 조회 1,810
15년 전 조회 2,524
15년 전 조회 3,590
15년 전 조회 2,926
15년 전 조회 1,483
15년 전 조회 2,483
15년 전 조회 2,676
15년 전 조회 1,991
15년 전 조회 1,952
15년 전 조회 3,244
15년 전 조회 3,120
15년 전 조회 6,128
15년 전 조회 2,071
15년 전 조회 4,849
15년 전 조회 1,963
15년 전 조회 2,244
15년 전 조회 2,221
15년 전 조회 2,220
15년 전 조회 1,702
15년 전 조회 1,949
15년 전 조회 2,077
15년 전 조회 2,027
15년 전 조회 2,728
15년 전 조회 1,867
15년 전 조회 1,981
15년 전 조회 1,469
15년 전 조회 1,584
15년 전 조회 1,580
15년 전 조회 1,504
15년 전 조회 1,471
15년 전 조회 1,512