후이즈검색 소스

· 15년 전 · 1109
<?
$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,467
15년 전 조회 1,498
15년 전 조회 1,751
15년 전 조회 1,247
15년 전 조회 1,629
15년 전 조회 896
15년 전 조회 1,259
15년 전 조회 1,530
15년 전 조회 2,902
15년 전 조회 1,299
15년 전 조회 1,278
15년 전 조회 1,149
15년 전 조회 1,049
15년 전 조회 1,056
15년 전 조회 3,659
15년 전 조회 3,033
15년 전 조회 2,205
15년 전 조회 2,638
15년 전 조회 1,749
15년 전 조회 1,285
15년 전 조회 1,265
15년 전 조회 2,556
15년 전 조회 1,100
15년 전 조회 2,153
15년 전 조회 946
15년 전 조회 2,100
15년 전 조회 1,030
15년 전 조회 2,709
15년 전 조회 953
15년 전 조회 1,395
15년 전 조회 937
15년 전 조회 3,170
15년 전 조회 1,522
15년 전 조회 1,520
15년 전 조회 1,543
15년 전 조회 1,612
15년 전 조회 1,194
15년 전 조회 1,964
15년 전 조회 1,505
15년 전 조회 1,074
15년 전 조회 2,968
15년 전 조회 1,324
15년 전 조회 1,531
15년 전 조회 1,306
15년 전 조회 2,166
15년 전 조회 2,189
15년 전 조회 1,837
15년 전 조회 1,198
15년 전 조회 1,450
15년 전 조회 1,110
15년 전 조회 1,078
15년 전 조회 1,317
15년 전 조회 2,693
15년 전 조회 2,725
15년 전 조회 1,701
15년 전 조회 1,227
15년 전 조회 1,383
15년 전 조회 1,381
15년 전 조회 1,282
15년 전 조회 1,145
15년 전 조회 1,082
15년 전 조회 1,431
15년 전 조회 1,396
15년 전 조회 1,157
15년 전 조회 1,116
15년 전 조회 1,293
15년 전 조회 1,763
15년 전 조회 1,297
15년 전 조회 1,616
15년 전 조회 1,439
15년 전 조회 2,168
15년 전 조회 3,186
15년 전 조회 2,533
15년 전 조회 1,116
15년 전 조회 2,124
15년 전 조회 2,333
15년 전 조회 1,628
15년 전 조회 1,588
15년 전 조회 2,865
15년 전 조회 2,778
15년 전 조회 5,771
15년 전 조회 1,707
15년 전 조회 4,501
15년 전 조회 1,603
15년 전 조회 1,878
15년 전 조회 1,859
15년 전 조회 1,845
15년 전 조회 1,342
15년 전 조회 1,586
15년 전 조회 1,729
15년 전 조회 1,636
15년 전 조회 2,346
15년 전 조회 1,513
15년 전 조회 1,619
15년 전 조회 1,113
15년 전 조회 1,211
15년 전 조회 1,198
15년 전 조회 1,162
15년 전 조회 1,088
15년 전 조회 1,145