Develop
2003.04.23 09:45
[php] whois정보 조회 프로그램
Views 11776 Comment 0
1.whois.htm
2.view.php
##############Whois.htm start###################
<script>
function kr_domain(form){
if (!kr.k_domain.value){
alert('도메인 써야 대는데..ㅡㅡ;');
kr.k_domain.focus();
return false;
}
form.submit();
}
function inter_domain(form){
if (!inter.i_domain.value){
alert('도메인 써야 대는데..ㅡㅡ;');
inter.i_domain.focus();
return false;
}
form.submit();
}
</script>
<table border=1>
<tr>
<td align=center>도메인 검색</td>
</tr>
<tr>
<td>
<table border=1>
<form method=get name=kr action=view.php>
<input type=hidden name=g value=1>
<tr><td><input type=text name=k_domain size=20></td></tr>
<tr align=center><td><input type=button value='국내도메인검색' onclick=kr_domain(this.form);></td></tr>
</form>
</table>
</td>
</tr>
<tr>
<td>
<table border=1>
<form method=get name=inter action=view.php>
<input type=hidden name=g value=2>
<tr><td><input type=text name=i_domain size=20></td></tr>
<tr align=center><td><input type=button value='국제도메인검색' onclick=inter_domain(this.form);></td></tr>
</form>
</table>
</td>
</tr>
</table>
############## Whois.htm end###################
############## view.php start###################
<?
if($g==1)$domain="$k_domain";
if($g==2)$domain="$i_domain";
if($g==1)$fp=fsockopen("whois.krnic.net",43);
if($g==2)$fp=fsockopen("whois.opensrs.net",43);
if(!$fp){
echo "whois 접속실팸돳!!!!!";
exit;
}
fputs($fp,"$domain"."n");
while(!feof($fp)){
$result .= fgets($fp,80);
}
fclose($fp);
$result = nl2br($result);
echo "$result";
echo "<input type=submit value=' 뒤로 ' onclick=history.go(-1)>";
?>
############## view.php end###################
No. | Category | Subject | Author | Date | Views |
---|---|---|---|---|---|
21 | Develop | [c] 소수점 반올림^^ | hooni | 2003.04.23 | 8502 |
20 | Develop | [c] 최대공약수 알고리즘 (유클릿) | hooni | 2003.04.23 | 8911 |
» | Develop | [php] whois정보 조회 프로그램 | hooni | 2003.04.23 | 11776 |
18 | Develop | [c] 간단한 링크드 리스트(linked list) 자료형 예제.. | hooni | 2003.04.23 | 9867 |
17 | Develop | [c] CGI Library to C^^ | hooni | 2003.04.23 | 8439 |
16 | Develop | [c] scanf(), printf() 포맷의 형변환 | hooni | 2003.04.23 | 10902 |
15 | Develop | [c] home env stack overflow | hooni | 2003.04.23 | 11555 |
14 | Develop | [c] 파일입출력 간단한 설명 | hooni | 2003.04.23 | 11285 |
13 | Develop | [C] C언어의 조건 연산자(Conditional Operator) | hooni | 2003.04.23 | 14286 |
12 | Database | [mysql] 접속과 테이블 생성 간단한 설명.. | hooni | 2003.04.23 | 18750 |
11 | Develop | [vb] 비쥬얼 베이직으로.. | hooni | 2003.04.23 | 53135 |
10 | Develop |
[c] 재미있는 코딩..
![]() |
hooni | 2003.04.23 | 21420 |