当前位置:K88软件开发文章中心编程语言AspAsp01 → 文章内容

asp域名查询代码

减小字体 增大字体 作者:佚名     来源:asp编程网  发布时间:2018-12-30 8:31:18

以前有了一个asp域名查询程序,使用的是万网提供的接口,也不知道是什么原因,现在不能使用了。
现在重新写了这个ASP域名查询程序,使用的是一个国外的网站www.checkdomain.com提供的接口,已经通过我的测试,可以正常查询。

源码下载地址:http://www.aspprogram.cn/soft.asp?id=51

index.asp
<
html>

<
title>
ASP域名查询<
/title>

<
style>

 
body 
td 

{
 
font-size:12px

 
}
<
/style>

<
body>


<
table 
width="
400"
 
height="
126"
 
border="
0"
 
align="
center"
 
cellpadding="
0"
 
cellspacing="
0"
>
 

<
form 
name="
form1"
 
method="
post"
 
action="
search.asp"
>
 

<
tr>
 

<
td 
colspan="
2"
 
align="
center"
>
<
strong>
域名查询系统<
/strong>
<
/td>
 

<
/tr>
 

<
tr>
 

<
td 
width="
269"
 
align="
right"
 
valign="
middle"
>
www.
 
 
<
input 
name="
dns"
 
type="
text"
 
id="
dns"
>

 
 
 
<
/td>
 

<
td 
width="
125"
>
<
input 
type="
submit"
 
name="
Submit"
 
value="
查询"
>
<
/td>
 

<
/tr>
 

<
tr>
 

 
<
td 
height="
55"
 
colspan="
2"
 
align="
center"
>

<
table 
width="
80%"
 
border="
0"
>

 
 
 
 
 
 
<
tr>

 
 
 
 
 
 
 
 
<
td 
align="
left"
>
<
input 
name="
ext"
 
type="
checkbox"
 
id="
checkbox"
 
value="
com"
 
checked>

.com 
<
/td>

 
 
 
 
 
 
 
 
<
td 
align="
left"
>
<
input 
name="
ext"
 
type="
checkbox"
 
id="
ext"
 
value="
cn"
>

 
 
 
 
 
 
 
 
 
 
.cn 
<
/td>

 
 
 
 
 
 
 
 
<
td 
align="
left"
>
<
input 
name="
ext"
 
type="
checkbox"
 
id="
ext"
 
value="
net"
>

 
 
 
 
 
 
 
 
 
 
.net<
/td>

 
 
 
 
 
 
 
 
<
td 
align="
left"
>
<
input 
name="
ext"
 
type="
checkbox"
 
id="
ext"
 
value="
org"
>

 
 
 
 
 
 
 
 
 
 
.org 
<
/td>

 
 
 
 
 
 
<
/tr>

 
 
 
 
 
 
<
tr>

 
 
 
 
 
 
 
 
<
td 
align="
left"
>
<
input 
name="
ext"
 
type="
checkbox"
 
id="
ext"
 
value="
com.cn"
>
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
.com.cn<
/td>

 
 
 
 
 
 
 
 
<
td 
align="
left"
>
<
input 
type="
checkbox"
 
name="
ext"
 
value="
net.cn"
>

 
 
 
 
 
 
 
 
 
 
.net.cn 
<
/td>

 
 
 
 
 
 
 
 
<
td 
align="
left"
>
<
input 
name="
ext"
 
type="
checkbox"
 
id="
ext"
 
value="
org.cn"
>
 

 
 
 
 
 
 
 
 
 
 
.org.cn 
<
/td>

 
 
 
 
 
 
 
 
<
td 
align="
left"
>
<
input 
name="
ext"
 
type="
checkbox"
 
id="
ext"
 
value="
gov.cn"
>

 
 
 
 
 
 
 
 
 
 
.gov.cn 
<
/td>

 
 
 
 
 
 
<
/tr>

 
 
 
 
<
/table>
<
/td>
 

<
/tr>
 

<
/form>

<
/table>
 

<
/body>

<
/html>


search.asp
<
style>

 
body 

{font-size:12px
}
<
/style>

<
%
On 
Error 
Resume 
Next
Server.ScriptTimeOut=9999999
Function 
getHTTPPage(Path)
 
 
 
 
 
 
 
 


GetBody(Path)
 
 
getHTTPPage=BytesToBstr(t,"
GB2312"
)
End 
function

Function 
GetBody(url) 

 
 
 
 
 
 
 
 
on 
error 
resume 
next
 
 
 
 
 
 
 
 
Set 
Retrieval 

CreateObject("
Microsoft.XMLHTTP"


 
 
 
 
 
 
 
 
With 
Retrieval 

 
 
 
 
 
 
 
 
.Open 
"
Get"

url, 
False, 
"
"

"
"
 

 
 
 
 
 
 
 
 
.Send 

 
 
 
 
 
 
 
 
GetBody 

.ResponseBody
 
 
 
 
 
 
 
 
End 
With 

 
 
 
 
 
 
 
 
Set 
Retrieval 

Nothing 

End 
Function

Function 
BytesToBstr(body,Cset)
 
 
 
 
 
 
 
 
dim 
objstream
 
 
 
 
 
 
 
 
set 
objstream 

Server.CreateObject("
adodb.stream"
)
 
 
 
 
 
 
 
 
objstream.Type 

1
 
 
 
 
 
 
 
 
objstream.Mode 
=3
 
 
 
 
 
 
 
 
objstream.Open
 
 
 
 
 
 
 
 
objstream.Write 
body
 
&nbs

[1] [2]  下一页


asp域名查询代码