후이즈검색 소스

<?
$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,266
15년 전 조회 1,303
15년 전 조회 1,559
15년 전 조회 1,043
15년 전 조회 1,410
15년 전 조회 707
15년 전 조회 1,054
15년 전 조회 1,310
15년 전 조회 2,722
15년 전 조회 1,087
15년 전 조회 1,065
15년 전 조회 968
15년 전 조회 840
15년 전 조회 853
15년 전 조회 3,447
15년 전 조회 2,810
15년 전 조회 1,993
15년 전 조회 2,439
15년 전 조회 1,531
15년 전 조회 1,077
15년 전 조회 1,071
15년 전 조회 2,354
15년 전 조회 895
15년 전 조회 1,938
15년 전 조회 734
15년 전 조회 1,888
15년 전 조회 827
15년 전 조회 2,494
15년 전 조회 743
15년 전 조회 1,177
15년 전 조회 721
15년 전 조회 2,896
15년 전 조회 1,271
15년 전 조회 1,299
15년 전 조회 1,310
15년 전 조회 1,371
15년 전 조회 981
15년 전 조회 1,742
15년 전 조회 1,272
15년 전 조회 853
15년 전 조회 2,715
15년 전 조회 1,100
15년 전 조회 1,296
15년 전 조회 1,096
15년 전 조회 1,950
15년 전 조회 1,958
15년 전 조회 1,610
15년 전 조회 965
15년 전 조회 1,204
15년 전 조회 899
15년 전 조회 848
15년 전 조회 1,098
15년 전 조회 2,454
15년 전 조회 2,475
15년 전 조회 1,451
15년 전 조회 1,002
15년 전 조회 1,155
15년 전 조회 1,155
15년 전 조회 1,027
15년 전 조회 926
15년 전 조회 855
15년 전 조회 1,216
15년 전 조회 1,168
15년 전 조회 916
15년 전 조회 887
15년 전 조회 1,062
15년 전 조회 1,529
15년 전 조회 1,057
15년 전 조회 1,384
15년 전 조회 1,225
15년 전 조회 1,899
15년 전 조회 2,960
15년 전 조회 2,295
15년 전 조회 891
15년 전 조회 1,902
15년 전 조회 2,087
15년 전 조회 1,391
15년 전 조회 1,365
15년 전 조회 2,631
15년 전 조회 2,516
15년 전 조회 5,503
15년 전 조회 1,471
15년 전 조회 4,233
15년 전 조회 1,364
15년 전 조회 1,660
15년 전 조회 1,626
15년 전 조회 1,614
15년 전 조회 1,119
15년 전 조회 1,363
15년 전 조회 1,507
15년 전 조회 1,408
15년 전 조회 2,137
15년 전 조회 1,282
15년 전 조회 1,342
15년 전 조회 886
15년 전 조회 997
15년 전 조회 960
15년 전 조회 924
15년 전 조회 873
15년 전 조회 935
🐛 버그신고