후이즈검색 소스

<?
$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,299
15년 전 조회 1,336
15년 전 조회 1,588
15년 전 조회 1,073
15년 전 조회 1,444
15년 전 조회 735
15년 전 조회 1,089
15년 전 조회 1,346
15년 전 조회 2,755
15년 전 조회 1,125
15년 전 조회 1,098
15년 전 조회 993
15년 전 조회 872
15년 전 조회 881
15년 전 조회 3,474
15년 전 조회 2,853
15년 전 조회 2,029
15년 전 조회 2,473
15년 전 조회 1,555
15년 전 조회 1,107
15년 전 조회 1,101
15년 전 조회 2,391
15년 전 조회 931
15년 전 조회 1,969
15년 전 조회 772
15년 전 조회 1,917
15년 전 조회 856
15년 전 조회 2,526
15년 전 조회 769
15년 전 조회 1,212
15년 전 조회 756
15년 전 조회 2,927
15년 전 조회 1,307
15년 전 조회 1,335
15년 전 조회 1,350
15년 전 조회 1,400
15년 전 조회 1,015
15년 전 조회 1,776
15년 전 조회 1,304
15년 전 조회 883
15년 전 조회 2,745
15년 전 조회 1,130
15년 전 조회 1,333
15년 전 조회 1,130
15년 전 조회 1,986
15년 전 조회 1,995
15년 전 조회 1,644
15년 전 조회 1,005
15년 전 조회 1,233
15년 전 조회 931
15년 전 조회 877
15년 전 조회 1,136
15년 전 조회 2,485
15년 전 조회 2,517
15년 전 조회 1,492
15년 전 조회 1,029
15년 전 조회 1,187
15년 전 조회 1,188
15년 전 조회 1,059
15년 전 조회 957
15년 전 조회 883
15년 전 조회 1,247
15년 전 조회 1,197
15년 전 조회 944
15년 전 조회 924
15년 전 조회 1,099
15년 전 조회 1,557
15년 전 조회 1,087
15년 전 조회 1,419
15년 전 조회 1,256
15년 전 조회 1,925
15년 전 조회 2,989
15년 전 조회 2,326
15년 전 조회 925
15년 전 조회 1,937
15년 전 조회 2,118
15년 전 조회 1,420
15년 전 조회 1,393
15년 전 조회 2,658
15년 전 조회 2,549
15년 전 조회 5,533
15년 전 조회 1,499
15년 전 조회 4,262
15년 전 조회 1,391
15년 전 조회 1,693
15년 전 조회 1,655
15년 전 조회 1,646
15년 전 조회 1,146
15년 전 조회 1,392
15년 전 조회 1,533
15년 전 조회 1,448
15년 전 조회 2,163
15년 전 조회 1,314
15년 전 조회 1,375
15년 전 조회 919
15년 전 조회 1,024
15년 전 조회 996
15년 전 조회 949
15년 전 조회 904
15년 전 조회 962