후이즈검색 하기 입니다.

· 9년 전 · 608

<?
$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>  

|
댓글을 작성하시려면 로그인이 필요합니다. 로그인

프로그램

+
제목 글쓴이 날짜 조회
9년 전 조회 356
9년 전 조회 732
9년 전 조회 766
9년 전 조회 489
9년 전 조회 416
9년 전 조회 444
9년 전 조회 800
9년 전 조회 449
9년 전 조회 632
9년 전 조회 494
9년 전 조회 559
9년 전 조회 486
9년 전 조회 745
9년 전 조회 470
9년 전 조회 460
9년 전 조회 387
9년 전 조회 496
9년 전 조회 433
9년 전 조회 509
9년 전 조회 591
9년 전 조회 371
9년 전 조회 442
9년 전 조회 436
9년 전 조회 576
9년 전 조회 392
9년 전 조회 516
9년 전 조회 369
9년 전 조회 413
9년 전 조회 327
9년 전 조회 510
9년 전 조회 398
9년 전 조회 407
9년 전 조회 448
9년 전 조회 404
9년 전 조회 401
9년 전 조회 353
9년 전 조회 748
9년 전 조회 809
9년 전 조회 775
9년 전 조회 689
9년 전 조회 478
9년 전 조회 668
9년 전 조회 776
9년 전 조회 464
9년 전 조회 762
9년 전 조회 727
9년 전 조회 1,118
9년 전 조회 730
9년 전 조회 927
9년 전 조회 609
9년 전 조회 714
9년 전 조회 502
9년 전 조회 463
9년 전 조회 585
9년 전 조회 560
9년 전 조회 731
9년 전 조회 447
9년 전 조회 533
9년 전 조회 478
9년 전 조회 429
9년 전 조회 499
9년 전 조회 385
9년 전 조회 403
9년 전 조회 367
9년 전 조회 419
9년 전 조회 402
9년 전 조회 852
9년 전 조회 369
9년 전 조회 304
9년 전 조회 565
9년 전 조회 377
9년 전 조회 404
9년 전 조회 354
9년 전 조회 331
9년 전 조회 287
9년 전 조회 274
9년 전 조회 328
9년 전 조회 348
9년 전 조회 288
9년 전 조회 233
9년 전 조회 343
9년 전 조회 284
9년 전 조회 309
9년 전 조회 328
9년 전 조회 369
9년 전 조회 261
9년 전 조회 302
9년 전 조회 368
9년 전 조회 285
9년 전 조회 405
9년 전 조회 340
9년 전 조회 271
9년 전 조회 242
9년 전 조회 290
9년 전 조회 236
9년 전 조회 276
9년 전 조회 299
9년 전 조회 240
9년 전 조회 295
9년 전 조회 253
🐛 버그신고