후이즈검색 소스

· 15년 전 · 1297
<?
$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,632
15년 전 조회 1,664
15년 전 조회 1,917
15년 전 조회 1,428
15년 전 조회 1,797
15년 전 조회 1,059
15년 전 조회 1,410
15년 전 조회 1,709
15년 전 조회 3,079
15년 전 조회 1,462
15년 전 조회 1,453
15년 전 조회 1,314
15년 전 조회 1,219
15년 전 조회 1,217
15년 전 조회 3,822
15년 전 조회 3,200
15년 전 조회 2,368
15년 전 조회 2,805
15년 전 조회 1,909
15년 전 조회 1,457
15년 전 조회 1,444
15년 전 조회 2,754
15년 전 조회 1,293
15년 전 조회 2,342
15년 전 조회 1,136
15년 전 조회 2,279
15년 전 조회 1,211
15년 전 조회 2,890
15년 전 조회 1,143
15년 전 조회 1,593
15년 전 조회 1,129
15년 전 조회 3,338
15년 전 조회 1,711
15년 전 조회 1,718
15년 전 조회 1,737
15년 전 조회 1,802
15년 전 조회 1,377
15년 전 조회 2,145
15년 전 조회 1,669
15년 전 조회 1,270
15년 전 조회 3,163
15년 전 조회 1,500
15년 전 조회 1,729
15년 전 조회 1,488
15년 전 조회 2,361
15년 전 조회 2,384
15년 전 조회 2,017
15년 전 조회 1,379
15년 전 조회 1,641
15년 전 조회 1,298
15년 전 조회 1,266
15년 전 조회 1,520
15년 전 조회 2,880
15년 전 조회 2,916
15년 전 조회 1,887
15년 전 조회 1,403
15년 전 조회 1,571
15년 전 조회 1,555
15년 전 조회 1,459
15년 전 조회 1,343
15년 전 조회 1,261
15년 전 조회 1,622
15년 전 조회 1,571
15년 전 조회 1,344
15년 전 조회 1,302
15년 전 조회 1,483
15년 전 조회 1,944
15년 전 조회 1,488
15년 전 조회 1,793
15년 전 조회 1,632
15년 전 조회 2,334
15년 전 조회 3,374
15년 전 조회 2,728
15년 전 조회 1,294
15년 전 조회 2,303
15년 전 조회 2,509
15년 전 조회 1,800
15년 전 조회 1,771
15년 전 조회 3,049
15년 전 조회 2,937
15년 전 조회 5,940
15년 전 조회 1,904
15년 전 조회 4,658
15년 전 조회 1,780
15년 전 조회 2,044
15년 전 조회 2,041
15년 전 조회 2,034
15년 전 조회 1,520
15년 전 조회 1,764
15년 전 조회 1,906
15년 전 조회 1,838
15년 전 조회 2,524
15년 전 조회 1,694
15년 전 조회 1,793
15년 전 조회 1,291
15년 전 조회 1,392
15년 전 조회 1,385
15년 전 조회 1,338
15년 전 조회 1,287
15년 전 조회 1,332