후이즈검색 소스

· 15년 전 · 1437
<?
$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,769
15년 전 조회 1,818
15년 전 조회 2,068
15년 전 조회 1,569
15년 전 조회 1,925
15년 전 조회 1,216
15년 전 조회 1,559
15년 전 조회 1,850
15년 전 조회 3,233
15년 전 조회 1,605
15년 전 조회 1,591
15년 전 조회 1,469
15년 전 조회 1,354
15년 전 조회 1,370
15년 전 조회 3,952
15년 전 조회 3,351
15년 전 조회 2,505
15년 전 조회 2,952
15년 전 조회 2,044
15년 전 조회 1,597
15년 전 조회 1,591
15년 전 조회 2,920
15년 전 조회 1,443
15년 전 조회 2,487
15년 전 조회 1,279
15년 전 조회 2,417
15년 전 조회 1,356
15년 전 조회 3,042
15년 전 조회 1,293
15년 전 조회 1,739
15년 전 조회 1,268
15년 전 조회 3,480
15년 전 조회 1,846
15년 전 조회 1,856
15년 전 조회 1,877
15년 전 조회 1,927
15년 전 조회 1,522
15년 전 조회 2,296
15년 전 조회 1,800
15년 전 조회 1,425
15년 전 조회 3,292
15년 전 조회 1,647
15년 전 조회 1,862
15년 전 조회 1,625
15년 전 조회 2,491
15년 전 조회 2,517
15년 전 조회 2,147
15년 전 조회 1,524
15년 전 조회 1,769
15년 전 조회 1,438
15년 전 조회 1,397
15년 전 조회 1,658
15년 전 조회 3,024
15년 전 조회 3,056
15년 전 조회 2,023
15년 전 조회 1,530
15년 전 조회 1,709
15년 전 조회 1,722
15년 전 조회 1,596
15년 전 조회 1,504
15년 전 조회 1,414
15년 전 조회 1,767
15년 전 조회 1,724
15년 전 조회 1,506
15년 전 조회 1,451
15년 전 조회 1,630
15년 전 조회 2,092
15년 전 조회 1,621
15년 전 조회 1,948
15년 전 조회 1,781
15년 전 조회 2,485
15년 전 조회 3,545
15년 전 조회 2,874
15년 전 조회 1,442
15년 전 조회 2,444
15년 전 조회 2,642
15년 전 조회 1,963
15년 전 조회 1,912
15년 전 조회 3,201
15년 전 조회 3,085
15년 전 조회 6,086
15년 전 조회 2,045
15년 전 조회 4,804
15년 전 조회 1,924
15년 전 조회 2,202
15년 전 조회 2,191
15년 전 조회 2,187
15년 전 조회 1,665
15년 전 조회 1,909
15년 전 조회 2,037
15년 전 조회 1,993
15년 전 조회 2,690
15년 전 조회 1,833
15년 전 조회 1,937
15년 전 조회 1,436
15년 전 조회 1,542
15년 전 조회 1,534
15년 전 조회 1,472
15년 전 조회 1,434
15년 전 조회 1,472