후이즈검색 소스

· 15년 전 · 1414
<?
$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,749
15년 전 조회 1,791
15년 전 조회 2,044
15년 전 조회 1,550
15년 전 조회 1,905
15년 전 조회 1,195
15년 전 조회 1,535
15년 전 조회 1,830
15년 전 조회 3,214
15년 전 조회 1,590
15년 전 조회 1,574
15년 전 조회 1,453
15년 전 조회 1,335
15년 전 조회 1,354
15년 전 조회 3,934
15년 전 조회 3,339
15년 전 조회 2,488
15년 전 조회 2,932
15년 전 조회 2,023
15년 전 조회 1,577
15년 전 조회 1,578
15년 전 조회 2,892
15년 전 조회 1,424
15년 전 조회 2,466
15년 전 조회 1,261
15년 전 조회 2,398
15년 전 조회 1,335
15년 전 조회 3,026
15년 전 조회 1,280
15년 전 조회 1,717
15년 전 조회 1,251
15년 전 조회 3,462
15년 전 조회 1,827
15년 전 조회 1,836
15년 전 조회 1,863
15년 전 조회 1,909
15년 전 조회 1,506
15년 전 조회 2,272
15년 전 조회 1,780
15년 전 조회 1,407
15년 전 조회 3,274
15년 전 조회 1,631
15년 전 조회 1,847
15년 전 조회 1,604
15년 전 조회 2,473
15년 전 조회 2,505
15년 전 조회 2,131
15년 전 조회 1,506
15년 전 조회 1,753
15년 전 조회 1,415
15년 전 조회 1,379
15년 전 조회 1,638
15년 전 조회 3,000
15년 전 조회 3,041
15년 전 조회 2,002
15년 전 조회 1,516
15년 전 조회 1,689
15년 전 조회 1,698
15년 전 조회 1,572
15년 전 조회 1,481
15년 전 조회 1,394
15년 전 조회 1,748
15년 전 조회 1,700
15년 전 조회 1,490
15년 전 조회 1,429
15년 전 조회 1,611
15년 전 조회 2,068
15년 전 조회 1,600
15년 전 조회 1,924
15년 전 조회 1,767
15년 전 조회 2,463
15년 전 조회 3,519
15년 전 조회 2,860
15년 전 조회 1,429
15년 전 조회 2,428
15년 전 조회 2,625
15년 전 조회 1,949
15년 전 조회 1,890
15년 전 조회 3,180
15년 전 조회 3,065
15년 전 조회 6,066
15년 전 조회 2,021
15년 전 조회 4,793
15년 전 조회 1,906
15년 전 조회 2,179
15년 전 조회 2,175
15년 전 조회 2,161
15년 전 조회 1,651
15년 전 조회 1,892
15년 전 조회 2,019
15년 전 조회 1,974
15년 전 조회 2,671
15년 전 조회 1,825
15년 전 조회 1,920
15년 전 조회 1,416
15년 전 조회 1,526
15년 전 조회 1,521
15년 전 조회 1,454
15년 전 조회 1,421
15년 전 조회 1,448