후이즈검색 소스

<?
$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,254
15년 전 조회 1,287
15년 전 조회 1,543
15년 전 조회 1,028
15년 전 조회 1,396
15년 전 조회 693
15년 전 조회 1,041
15년 전 조회 1,299
15년 전 조회 2,710
15년 전 조회 1,075
15년 전 조회 1,051
15년 전 조회 953
15년 전 조회 830
15년 전 조회 840
15년 전 조회 3,434
15년 전 조회 2,800
15년 전 조회 1,979
15년 전 조회 2,426
15년 전 조회 1,519
15년 전 조회 1,061
15년 전 조회 1,057
15년 전 조회 2,336
15년 전 조회 883
15년 전 조회 1,923
15년 전 조회 722
15년 전 조회 1,876
15년 전 조회 812
15년 전 조회 2,483
15년 전 조회 729
15년 전 조회 1,162
15년 전 조회 713
15년 전 조회 2,880
15년 전 조회 1,256
15년 전 조회 1,289
15년 전 조회 1,301
15년 전 조회 1,360
15년 전 조회 967
15년 전 조회 1,726
15년 전 조회 1,258
15년 전 조회 839
15년 전 조회 2,699
15년 전 조회 1,088
15년 전 조회 1,284
15년 전 조회 1,084
15년 전 조회 1,935
15년 전 조회 1,945
15년 전 조회 1,600
15년 전 조회 954
15년 전 조회 1,193
15년 전 조회 890
15년 전 조회 836
15년 전 조회 1,083
15년 전 조회 2,442
15년 전 조회 2,465
15년 전 조회 1,438
15년 전 조회 988
15년 전 조회 1,144
15년 전 조회 1,146
15년 전 조회 1,013
15년 전 조회 910
15년 전 조회 842
15년 전 조회 1,202
15년 전 조회 1,154
15년 전 조회 899
15년 전 조회 873
15년 전 조회 1,049
15년 전 조회 1,514
15년 전 조회 1,049
15년 전 조회 1,369
15년 전 조회 1,214
15년 전 조회 1,887
15년 전 조회 2,947
15년 전 조회 2,282
15년 전 조회 881
15년 전 조회 1,887
15년 전 조회 2,075
15년 전 조회 1,380
15년 전 조회 1,353
15년 전 조회 2,616
15년 전 조회 2,503
15년 전 조회 5,490
15년 전 조회 1,456
15년 전 조회 4,219
15년 전 조회 1,349
15년 전 조회 1,642
15년 전 조회 1,609
15년 전 조회 1,604
15년 전 조회 1,105
15년 전 조회 1,353
15년 전 조회 1,494
15년 전 조회 1,398
15년 전 조회 2,126
15년 전 조회 1,270
15년 전 조회 1,323
15년 전 조회 870
15년 전 조회 984
15년 전 조회 945
15년 전 조회 912
15년 전 조회 861
15년 전 조회 922
🐛 버그신고