후이즈검색 소스

<?
$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,300
15년 전 조회 1,342
15년 전 조회 1,589
15년 전 조회 1,076
15년 전 조회 1,445
15년 전 조회 735
15년 전 조회 1,094
15년 전 조회 1,346
15년 전 조회 2,761
15년 전 조회 1,128
15년 전 조회 1,099
15년 전 조회 994
15년 전 조회 874
15년 전 조회 884
15년 전 조회 3,477
15년 전 조회 2,856
15년 전 조회 2,032
15년 전 조회 2,475
15년 전 조회 1,558
15년 전 조회 1,108
15년 전 조회 1,104
15년 전 조회 2,393
15년 전 조회 934
15년 전 조회 1,976
15년 전 조회 774
15년 전 조회 1,919
15년 전 조회 856
15년 전 조회 2,528
15년 전 조회 770
15년 전 조회 1,215
15년 전 조회 758
15년 전 조회 2,930
15년 전 조회 1,309
15년 전 조회 1,340
15년 전 조회 1,351
15년 전 조회 1,404
15년 전 조회 1,017
15년 전 조회 1,781
15년 전 조회 1,305
15년 전 조회 884
15년 전 조회 2,747
15년 전 조회 1,131
15년 전 조회 1,336
15년 전 조회 1,133
15년 전 조회 1,986
15년 전 조회 1,997
15년 전 조회 1,647
15년 전 조회 1,009
15년 전 조회 1,237
15년 전 조회 935
15년 전 조회 879
15년 전 조회 1,138
15년 전 조회 2,486
15년 전 조회 2,520
15년 전 조회 1,497
15년 전 조회 1,030
15년 전 조회 1,188
15년 전 조회 1,190
15년 전 조회 1,060
15년 전 조회 960
15년 전 조회 886
15년 전 조회 1,248
15년 전 조회 1,198
15년 전 조회 948
15년 전 조회 925
15년 전 조회 1,102
15년 전 조회 1,559
15년 전 조회 1,092
15년 전 조회 1,420
15년 전 조회 1,256
15년 전 조회 1,929
15년 전 조회 2,993
15년 전 조회 2,330
15년 전 조회 930
15년 전 조회 1,939
15년 전 조회 2,120
15년 전 조회 1,424
15년 전 조회 1,395
15년 전 조회 2,662
15년 전 조회 2,554
15년 전 조회 5,533
15년 전 조회 1,500
15년 전 조회 4,265
15년 전 조회 1,393
15년 전 조회 1,696
15년 전 조회 1,657
15년 전 조회 1,649
15년 전 조회 1,148
15년 전 조회 1,395
15년 전 조회 1,535
15년 전 조회 1,451
15년 전 조회 2,167
15년 전 조회 1,317
15년 전 조회 1,376
15년 전 조회 923
15년 전 조회 1,027
15년 전 조회 998
15년 전 조회 952
15년 전 조회 908
15년 전 조회 965