후이즈검색 소스

· 15년 전 · 1243
<?
$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,586
15년 전 조회 1,617
15년 전 조회 1,879
15년 전 조회 1,373
15년 전 조회 1,749
15년 전 조회 1,008
15년 전 조회 1,377
15년 전 조회 1,650
15년 전 조회 3,035
15년 전 조회 1,425
15년 전 조회 1,399
15년 전 조회 1,268
15년 전 조회 1,165
15년 전 조회 1,164
15년 전 조회 3,778
15년 전 조회 3,163
15년 전 조회 2,318
15년 전 조회 2,768
15년 전 조회 1,855
15년 전 조회 1,399
15년 전 조회 1,394
15년 전 조회 2,703
15년 전 조회 1,231
15년 전 조회 2,286
15년 전 조회 1,077
15년 전 조회 2,229
15년 전 조회 1,163
15년 전 조회 2,832
15년 전 조회 1,092
15년 전 조회 1,531
15년 전 조회 1,067
15년 전 조회 3,306
15년 전 조회 1,650
15년 전 조회 1,672
15년 전 조회 1,690
15년 전 조회 1,744
15년 전 조회 1,332
15년 전 조회 2,097
15년 전 조회 1,623
15년 전 조회 1,215
15년 전 조회 3,098
15년 전 조회 1,446
15년 전 조회 1,672
15년 전 조회 1,428
15년 전 조회 2,305
15년 전 조회 2,325
15년 전 조회 1,966
15년 전 조회 1,330
15년 전 조회 1,578
15년 전 조회 1,244
15년 전 조회 1,212
15년 전 조회 1,465
15년 전 조회 2,837
15년 전 조회 2,842
15년 전 조회 1,841
15년 전 조회 1,352
15년 전 조회 1,529
15년 전 조회 1,504
15년 전 조회 1,406
15년 전 조회 1,283
15년 전 조회 1,220
15년 전 조회 1,573
15년 전 조회 1,518
15년 전 조회 1,297
15년 전 조회 1,250
15년 전 조회 1,433
15년 전 조회 1,899
15년 전 조회 1,436
15년 전 조회 1,746
15년 전 조회 1,585
15년 전 조회 2,298
15년 전 조회 3,315
15년 전 조회 2,679
15년 전 조회 1,243
15년 전 조회 2,249
15년 전 조회 2,476
15년 전 조회 1,753
15년 전 조회 1,720
15년 전 조회 2,993
15년 전 조회 2,902
15년 전 조회 5,905
15년 전 조회 1,852
15년 전 조회 4,622
15년 전 조회 1,730
15년 전 조회 2,002
15년 전 조회 1,989
15년 전 조회 1,982
15년 전 조회 1,473
15년 전 조회 1,709
15년 전 조회 1,850
15년 전 조회 1,780
15년 전 조회 2,480
15년 전 조회 1,645
15년 전 조회 1,757
15년 전 조회 1,241
15년 전 조회 1,341
15년 전 조회 1,328
15년 전 조회 1,284
15년 전 조회 1,238
15년 전 조회 1,283