후이즈검색 소스

<?
$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,357
15년 전 조회 1,383
15년 전 조회 1,649
15년 전 조회 1,137
15년 전 조회 1,497
15년 전 조회 795
15년 전 조회 1,141
15년 전 조회 1,399
15년 전 조회 2,802
15년 전 조회 1,183
15년 전 조회 1,154
15년 전 조회 1,050
15년 전 조회 936
15년 전 조회 934
15년 전 조회 3,532
15년 전 조회 2,897
15년 전 조회 2,083
15년 전 조회 2,523
15년 전 조회 1,614
15년 전 조회 1,174
15년 전 조회 1,163
15년 전 조회 2,443
15년 전 조회 980
15년 전 조회 2,026
15년 전 조회 826
15년 전 조회 1,976
15년 전 조회 913
15년 전 조회 2,583
15년 전 조회 834
15년 전 조회 1,263
15년 전 조회 816
15년 전 조회 2,977
15년 전 조회 1,365
15년 전 조회 1,387
15년 전 조회 1,407
15년 전 조회 1,459
15년 전 조회 1,059
15년 전 조회 1,828
15년 전 조회 1,362
15년 전 조회 943
15년 전 조회 2,812
15년 전 조회 1,193
15년 전 조회 1,389
15년 전 조회 1,181
15년 전 조회 2,036
15년 전 조회 2,048
15년 전 조회 1,695
15년 전 조회 1,055
15년 전 조회 1,294
15년 전 조회 989
15년 전 조회 936
15년 전 조회 1,191
15년 전 조회 2,541
15년 전 조회 2,563
15년 전 조회 1,541
15년 전 조회 1,083
15년 전 조회 1,245
15년 전 조회 1,247
15년 전 조회 1,118
15년 전 조회 1,010
15년 전 조회 948
15년 전 조회 1,308
15년 전 조회 1,261
15년 전 조회 1,011
15년 전 조회 971
15년 전 조회 1,154
15년 전 조회 1,619
15년 전 조회 1,147
15년 전 조회 1,475
15년 전 조회 1,316
15년 전 조회 1,982
15년 전 조회 3,043
15년 전 조회 2,390
15년 전 조회 981
15년 전 조회 1,990
15년 전 조회 2,188
15년 전 조회 1,485
15년 전 조회 1,446
15년 전 조회 2,713
15년 전 조회 2,604
15년 전 조회 5,588
15년 전 조회 1,549
15년 전 조회 4,327
15년 전 조회 1,451
15년 전 조회 1,736
15년 전 조회 1,709
15년 전 조회 1,710
15년 전 조회 1,207
15년 전 조회 1,450
15년 전 조회 1,584
15년 전 조회 1,500
15년 전 조회 2,220
15년 전 조회 1,359
15년 전 조회 1,433
15년 전 조회 977
15년 전 조회 1,070
15년 전 조회 1,047
15년 전 조회 1,003
15년 전 조회 953
15년 전 조회 1,021