후이즈검색 소스

<?
$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,349
15년 전 조회 1,380
15년 전 조회 1,645
15년 전 조회 1,130
15년 전 조회 1,489
15년 전 조회 790
15년 전 조회 1,139
15년 전 조회 1,394
15년 전 조회 2,797
15년 전 조회 1,181
15년 전 조회 1,145
15년 전 조회 1,043
15년 전 조회 930
15년 전 조회 929
15년 전 조회 3,526
15년 전 조회 2,894
15년 전 조회 2,078
15년 전 조회 2,518
15년 전 조회 1,607
15년 전 조회 1,167
15년 전 조회 1,157
15년 전 조회 2,439
15년 전 조회 976
15년 전 조회 2,023
15년 전 조회 825
15년 전 조회 1,972
15년 전 조회 910
15년 전 조회 2,579
15년 전 조회 832
15년 전 조회 1,260
15년 전 조회 815
15년 전 조회 2,969
15년 전 조회 1,359
15년 전 조회 1,383
15년 전 조회 1,404
15년 전 조회 1,452
15년 전 조회 1,055
15년 전 조회 1,820
15년 전 조회 1,356
15년 전 조회 935
15년 전 조회 2,806
15년 전 조회 1,187
15년 전 조회 1,384
15년 전 조회 1,177
15년 전 조회 2,028
15년 전 조회 2,045
15년 전 조회 1,693
15년 전 조회 1,051
15년 전 조회 1,290
15년 전 조회 985
15년 전 조회 931
15년 전 조회 1,187
15년 전 조회 2,538
15년 전 조회 2,558
15년 전 조회 1,540
15년 전 조회 1,076
15년 전 조회 1,239
15년 전 조회 1,242
15년 전 조회 1,110
15년 전 조회 1,003
15년 전 조회 940
15년 전 조회 1,303
15년 전 조회 1,256
15년 전 조회 1,007
15년 전 조회 964
15년 전 조회 1,149
15년 전 조회 1,614
15년 전 조회 1,142
15년 전 조회 1,469
15년 전 조회 1,308
15년 전 조회 1,972
15년 전 조회 3,037
15년 전 조회 2,381
15년 전 조회 976
15년 전 조회 1,985
15년 전 조회 2,180
15년 전 조회 1,479
15년 전 조회 1,444
15년 전 조회 2,708
15년 전 조회 2,598
15년 전 조회 5,584
15년 전 조회 1,545
15년 전 조회 4,319
15년 전 조회 1,443
15년 전 조회 1,733
15년 전 조회 1,706
15년 전 조회 1,705
15년 전 조회 1,204
15년 전 조회 1,442
15년 전 조회 1,579
15년 전 조회 1,498
15년 전 조회 2,215
15년 전 조회 1,355
15년 전 조회 1,426
15년 전 조회 973
15년 전 조회 1,066
15년 전 조회 1,042
15년 전 조회 993
15년 전 조회 948
15년 전 조회 1,016