후이즈검색 소스

· 15년 전 · 1265
<?
$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,608
15년 전 조회 1,645
15년 전 조회 1,900
15년 전 조회 1,399
15년 전 조회 1,773
15년 전 조회 1,029
15년 전 조회 1,391
15년 전 조회 1,674
15년 전 조회 3,054
15년 전 조회 1,449
15년 전 조회 1,425
15년 전 조회 1,289
15년 전 조회 1,191
15년 전 조회 1,192
15년 전 조회 3,797
15년 전 조회 3,177
15년 전 조회 2,342
15년 전 조회 2,791
15년 전 조회 1,880
15년 전 조회 1,420
15년 전 조회 1,417
15년 전 조회 2,726
15년 전 조회 1,261
15년 전 조회 2,316
15년 전 조회 1,099
15년 전 조회 2,254
15년 전 조회 1,182
15년 전 조회 2,863
15년 전 조회 1,109
15년 전 조회 1,558
15년 전 조회 1,097
15년 전 조회 3,320
15년 전 조회 1,681
15년 전 조회 1,695
15년 전 조회 1,714
15년 전 조회 1,771
15년 전 조회 1,354
15년 전 조회 2,123
15년 전 조회 1,650
15년 전 조회 1,237
15년 전 조회 3,126
15년 전 조회 1,467
15년 전 조회 1,696
15년 전 조회 1,463
15년 전 조회 2,334
15년 전 조회 2,359
15년 전 조회 1,994
15년 전 조회 1,360
15년 전 조회 1,603
15년 전 조회 1,266
15년 전 조회 1,243
15년 전 조회 1,495
15년 전 조회 2,860
15년 전 조회 2,873
15년 전 조회 1,869
15년 전 조회 1,379
15년 전 조회 1,551
15년 전 조회 1,529
15년 전 조회 1,424
15년 전 조회 1,318
15년 전 조회 1,243
15년 전 조회 1,595
15년 전 조회 1,546
15년 전 조회 1,323
15년 전 조회 1,279
15년 전 조회 1,464
15년 전 조회 1,916
15년 전 조회 1,465
15년 전 조회 1,770
15년 전 조회 1,613
15년 전 조회 2,313
15년 전 조회 3,332
15년 전 조회 2,697
15년 전 조회 1,271
15년 전 조회 2,272
15년 전 조회 2,493
15년 전 조회 1,782
15년 전 조회 1,744
15년 전 조회 3,024
15년 전 조회 2,915
15년 전 조회 5,921
15년 전 조회 1,878
15년 전 조회 4,641
15년 전 조회 1,756
15년 전 조회 2,024
15년 전 조회 2,021
15년 전 조회 2,011
15년 전 조회 1,507
15년 전 조회 1,739
15년 전 조회 1,876
15년 전 조회 1,811
15년 전 조회 2,496
15년 전 조회 1,665
15년 전 조회 1,772
15년 전 조회 1,266
15년 전 조회 1,371
15년 전 조회 1,352
15년 전 조회 1,309
15년 전 조회 1,264
15년 전 조회 1,307