후이즈검색 소스

· 15년 전 · 1151
<?
$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,510
15년 전 조회 1,547
15년 전 조회 1,803
15년 전 조회 1,299
15년 전 조회 1,668
15년 전 조회 938
15년 전 조회 1,302
15년 전 조회 1,572
15년 전 조회 2,956
15년 전 조회 1,348
15년 전 조회 1,319
15년 전 조회 1,196
15년 전 조회 1,093
15년 전 조회 1,094
15년 전 조회 3,698
15년 전 조회 3,077
15년 전 조회 2,246
15년 전 조회 2,684
15년 전 조회 1,785
15년 전 조회 1,321
15년 전 조회 1,316
15년 전 조회 2,617
15년 전 조회 1,150
15년 전 조회 2,206
15년 전 조회 996
15년 전 조회 2,148
15년 전 조회 1,083
15년 전 조회 2,758
15년 전 조회 1,008
15년 전 조회 1,433
15년 전 조회 985
15년 전 조회 3,228
15년 전 조회 1,563
15년 전 조회 1,576
15년 전 조회 1,595
15년 전 조회 1,660
15년 전 조회 1,245
15년 전 조회 2,010
15년 전 조회 1,551
15년 전 조회 1,129
15년 전 조회 3,007
15년 전 조회 1,365
15년 전 조회 1,584
15년 전 조회 1,357
15년 전 조회 2,217
15년 전 조회 2,237
15년 전 조회 1,879
15년 전 조회 1,249
15년 전 조회 1,489
15년 전 조회 1,152
15년 전 조회 1,122
15년 전 조회 1,369
15년 전 조회 2,743
15년 전 조회 2,759
15년 전 조회 1,739
15년 전 조회 1,269
15년 전 조회 1,434
15년 전 조회 1,421
15년 전 조회 1,324
15년 전 조회 1,189
15년 전 조회 1,124
15년 전 조회 1,484
15년 전 조회 1,435
15년 전 조회 1,201
15년 전 조회 1,163
15년 전 조회 1,334
15년 전 조회 1,806
15년 전 조회 1,343
15년 전 조회 1,655
15년 전 조회 1,489
15년 전 조회 2,218
15년 전 조회 3,225
15년 전 조회 2,583
15년 전 조회 1,158
15년 전 조회 2,165
15년 전 조회 2,372
15년 전 조회 1,669
15년 전 조회 1,632
15년 전 조회 2,907
15년 전 조회 2,827
15년 전 조회 5,825
15년 전 조회 1,754
15년 전 조회 4,558
15년 전 조회 1,649
15년 전 조회 1,912
15년 전 조회 1,898
15년 전 조회 1,888
15년 전 조회 1,380
15년 전 조회 1,625
15년 전 조회 1,776
15년 전 조회 1,679
15년 전 조회 2,393
15년 전 조회 1,557
15년 전 조회 1,678
15년 전 조회 1,155
15년 전 조회 1,256
15년 전 조회 1,240
15년 전 조회 1,201
15년 전 조회 1,141
15년 전 조회 1,190