Develop
2003.04.23 09:45
[php] whois정보 조회 프로그램
Views 11777 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 |
---|---|---|---|---|---|
841 | Develop |
'2014 모바일 개발 트렌드' 발표자료입니다.
![]() |
hooni | 2014.10.02 | 1142 |
840 | Develop | Aspect Oriented Programming in Objective-C | hooni | 2015.05.18 | 953 |
839 | Develop |
DDay Memo 1.9.4 소스코드
![]() |
hooni | 2015.10.03 | 0 |
838 | Develop |
GCM 사용하기 2 (단말에 GCM 구현하기)
![]() |
hooni | 2013.07.06 | 23418 |
837 | Develop |
GCM 사용하기 3 (JSP로 GCM 푸시 서버 만들기)
4 ![]() |
hooni | 2013.07.06 | 25432 |
836 | Develop | git 브런치 배우기 (링크) | hooni | 2013.07.09 | 20706 |
835 | Develop |
GPL, AGPL, MPL,.. 한눈에 보는 오픈소스SW 라이선스
![]() |
hooni | 2014.10.14 | 1274 |
834 | Develop | How to Test SMTP AUTH using Telnet | hooni | 2018.04.05 | 1597 |
833 | Develop |
JSON, BSON 변환
![]() |
hooni | 2013.04.23 | 11878 |
832 | Develop | Laravel 5 Failed opening required bootstrap/../vendor/autoload.php | hooni | 2018.01.24 | 1844 |
831 | Develop |
Mac OS 에 Jenkins 설치하기 (Homebrew)
2 ![]() |
hooni | 2017.03.15 | 8412 |
830 | Develop |
macOS에 node, npm 설치하기 (homebrew)
![]() |
hooni | 2021.11.06 | 1483 |