후이즈검색 소스

· 15년 전 · 1190
<?
$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,550
15년 전 조회 1,576
15년 전 조회 1,838
15년 전 조회 1,330
15년 전 조회 1,702
15년 전 조회 971
15년 전 조회 1,330
15년 전 조회 1,609
15년 전 조회 2,988
15년 전 조회 1,379
15년 전 조회 1,352
15년 전 조회 1,224
15년 전 조회 1,122
15년 전 조회 1,125
15년 전 조회 3,729
15년 전 조회 3,116
15년 전 조회 2,278
15년 전 조회 2,717
15년 전 조회 1,818
15년 전 조회 1,356
15년 전 조회 1,348
15년 전 조회 2,649
15년 전 조회 1,189
15년 전 조회 2,234
15년 전 조회 1,022
15년 전 조회 2,174
15년 전 조회 1,113
15년 전 조회 2,792
15년 전 조회 1,042
15년 전 조회 1,473
15년 전 조회 1,014
15년 전 조회 3,265
15년 전 조회 1,598
15년 전 조회 1,611
15년 전 조회 1,626
15년 전 조회 1,686
15년 전 조회 1,284
15년 전 조회 2,044
15년 전 조회 1,580
15년 전 조회 1,160
15년 전 조회 3,040
15년 전 조회 1,393
15년 전 조회 1,615
15년 전 조회 1,385
15년 전 조회 2,252
15년 전 조회 2,271
15년 전 조회 1,910
15년 전 조회 1,274
15년 전 조회 1,523
15년 전 조회 1,191
15년 전 조회 1,155
15년 전 조회 1,404
15년 전 조회 2,773
15년 전 조회 2,788
15년 전 조회 1,782
15년 전 조회 1,299
15년 전 조회 1,472
15년 전 조회 1,450
15년 전 조회 1,354
15년 전 조회 1,227
15년 전 조회 1,157
15년 전 조회 1,514
15년 전 조회 1,466
15년 전 조회 1,238
15년 전 조회 1,191
15년 전 조회 1,376
15년 전 조회 1,841
15년 전 조회 1,374
15년 전 조회 1,690
15년 전 조회 1,523
15년 전 조회 2,257
15년 전 조회 3,258
15년 전 조회 2,621
15년 전 조회 1,191
15년 전 조회 2,195
15년 전 조회 2,407
15년 전 조회 1,705
15년 전 조회 1,664
15년 전 조회 2,938
15년 전 조회 2,857
15년 전 조회 5,864
15년 전 조회 1,780
15년 전 조회 4,591
15년 전 조회 1,684
15년 전 조회 1,944
15년 전 조회 1,931
15년 전 조회 1,918
15년 전 조회 1,419
15년 전 조회 1,660
15년 전 조회 1,804
15년 전 조회 1,719
15년 전 조회 2,425
15년 전 조회 1,591
15년 전 조회 1,712
15년 전 조회 1,189
15년 전 조회 1,288
15년 전 조회 1,274
15년 전 조회 1,234
15년 전 조회 1,179
15년 전 조회 1,226