후이즈검색 소스

· 15년 전 · 1280
<?
$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,622
15년 전 조회 1,654
15년 전 조회 1,912
15년 전 조회 1,412
15년 전 조회 1,784
15년 전 조회 1,043
15년 전 조회 1,399
15년 전 조회 1,682
15년 전 조회 3,067
15년 전 조회 1,455
15년 전 조회 1,434
15년 전 조회 1,300
15년 전 조회 1,203
15년 전 조회 1,204
15년 전 조회 3,808
15년 전 조회 3,188
15년 전 조회 2,355
15년 전 조회 2,798
15년 전 조회 1,892
15년 전 조회 1,437
15년 전 조회 1,424
15년 전 조회 2,737
15년 전 조회 1,277
15년 전 조회 2,324
15년 전 조회 1,119
15년 전 조회 2,264
15년 전 조회 1,193
15년 전 조회 2,876
15년 전 조회 1,121
15년 전 조회 1,573
15년 전 조회 1,111
15년 전 조회 3,333
15년 전 조회 1,691
15년 전 조회 1,703
15년 전 조회 1,728
15년 전 조회 1,783
15년 전 조회 1,365
15년 전 조회 2,136
15년 전 조회 1,656
15년 전 조회 1,250
15년 전 조회 3,144
15년 전 조회 1,481
15년 전 조회 1,707
15년 전 조회 1,473
15년 전 조회 2,348
15년 전 조회 2,370
15년 전 조회 2,003
15년 전 조회 1,367
15년 전 조회 1,617
15년 전 조회 1,281
15년 전 조회 1,254
15년 전 조회 1,507
15년 전 조회 2,873
15년 전 조회 2,885
15년 전 조회 1,877
15년 전 조회 1,387
15년 전 조회 1,561
15년 전 조회 1,538
15년 전 조회 1,438
15년 전 조회 1,329
15년 전 조회 1,253
15년 전 조회 1,610
15년 전 조회 1,550
15년 전 조회 1,335
15년 전 조회 1,290
15년 전 조회 1,468
15년 전 조회 1,928
15년 전 조회 1,475
15년 전 조회 1,781
15년 전 조회 1,623
15년 전 조회 2,319
15년 전 조회 3,347
15년 전 조회 2,716
15년 전 조회 1,285
15년 전 조회 2,291
15년 전 조회 2,500
15년 전 조회 1,791
15년 전 조회 1,755
15년 전 조회 3,038
15년 전 조회 2,923
15년 전 조회 5,931
15년 전 조회 1,885
15년 전 조회 4,646
15년 전 조회 1,768
15년 전 조회 2,036
15년 전 조회 2,032
15년 전 조회 2,021
15년 전 조회 1,514
15년 전 조회 1,749
15년 전 조회 1,892
15년 전 조회 1,821
15년 전 조회 2,512
15년 전 조회 1,676
15년 전 조회 1,782
15년 전 조회 1,277
15년 전 조회 1,380
15년 전 조회 1,365
15년 전 조회 1,322
15년 전 조회 1,273
15년 전 조회 1,317