域名查询系统为什么出现http 405 - 资源被禁止! ( 积分: 100 )

Y

yyjqtww

Unregistered / Unconfirmed
GUEST, unregistred user!
大家好。下面是我从网上下载的域名查询系统。在本地计算机上调试是成功的,但是一上传至网上后就出现了问题http 405 - 资源被禁止!请各位帮我看一下。谢谢各位了!
代码如下:
[red]index.asp代码如下:[/red]
<%
On Error Resume Next
Server.ScriptTimeOut=9999999
Function getHTTPPage(Path)
t = GetBody(Path)
getHTTPPage=BytesToBstr(t,&quot;GB2312&quot;)
End function
Function GetBody(url)
on error resume next
Set Retrieval = CreateObject(&quot;Microsoft.XMLHTTP&quot;)
With Retrieval
.Open &quot;Get&quot;, url, False, &quot;&quot;, &quot;&quot;
.Send
GetBody = .ResponseBody
End With
Set Retrieval = Nothing
End Function
Function BytesToBstr(body,Cset)
dim objstream
set objstream = Server.CreateObject(&quot;adodb.stream&quot;)
objstream.Type = 1
objstream.Mode =3
objstream.Open
objstream.Write body
objstream.Position = 0
objstream.Type = 2
objstream.Charset = Cset
BytesToBstr = objstream.ReadText
objstream.Close
set objstream = nothing
End Function
Function Newstring(wstr,strng)
Newstring=Instr(lcase(wstr),lcase(strng))
if Newstring<=0 then
Newstring=Len(wstr)
End Function
%>
<%
if request(&quot;domain&quot;)<>&quot;&quot;
then
url=&quot;https://www.onlinenic.com//cgi-bin/4e/check_domain.cgi?type_encode=1&amp;domain=&quot;&amp;request(&quot;domain&quot;)&amp;&quot;&amp;root=&quot;&amp;request(&quot;root&quot;)
wstr=getHTTPPage(url)
'response.write Instr (wstr,&quot;可以注册&quot;)
start=Newstring(wstr,&quot;查询域名结果&quot;)
over=Newstring(wstr,&quot;按此返回&quot;)
body=mid(wstr,start+0,over-start)
body=replace(body,&quot;查询域名结果&quot;,&quot;&quot;)
body=replace(body,&quot;</b></font></div><br>&quot;,&quot;&quot;)
body=replace(body,&quot;javascript:tmp=openwin('/cgi-bin/4e/whois.cgi?domain=&quot;,&quot;whois.asp?domain=&quot;)
body=replace(body,&quot;')&quot;,&quot;&quot;)
body=replace(body,&quot;<center><a href='http://www.OnlineNIC.com/4e/'>&quot;,&quot;&quot;)
body=replace(body,&quot;<b>没有被注册</b>&quot;,&quot;<b><a href='http://www.reg.com?reg.asp?domain=&quot;+request(&quot;domain&quot;)+request(&quot;root&quot;)+&quot;'>没有被注册</a></b>&quot;)
response.write body
end if
%>
<p align=&quot;center&quot;>
<iframe marginwidth=0 marginheight=0 frameborder=0 bordercolor='#000000' scrolling=no src='http://union.sogou.com/cpc/partner.php?pid=hljec&amp;type=12' width=590 height=95></iframe>
</p>
<table width=&quot;40%&quot;
border=&quot;0&quot;
align=&quot;center&quot;
cellpadding=&quot;5&quot;
cellspacing=&quot;1&quot;
bgcolor=&quot;#999999&quot;>
<tr>
<td height=&quot;26&quot;
bgcolor=&quot;efefef&quot;>域名查询系统</td>
</tr>
<tr>
<td bgcolor=&quot;#FFFFFF&quot;><form name=&quot;form1&quot;
method=&quot;post&quot;
action=&quot;&quot;><table width=&quot;100%&quot;
border=&quot;0&quot;
cellspacing=&quot;1&quot;
cellpadding=&quot;1&quot;>
<tr>

<td height=&quot;36&quot;> <div align=&quot;center&quot;>www.
<input type=&quot;text&quot;
name=&quot;domain&quot;>
<select name=&quot;root&quot;
id=&quot;select&quot;>
<option value=&quot;.cn&quot;
selected>.cn</option>
<option value=&quot;.com&quot;>.com</option>
<option value=&quot;.net&quot;>.net</option>
<option value=&quot;.org&quot;>.org</option>
<option value=&quot;.com.cn&quot;>.com.cn</option>
<option value=&quot;.net.cn&quot;>.net.cn</option>
<option value=&quot;.gov.cn&quot;>.gov.cn</option>
</select>
</div></td>

</tr>
<tr>
<td height=&quot;35&quot;>
<div align=&quot;center&quot;>
<input type=&quot;submit&quot;
name=&quot;Submit&quot;
value=&quot;
查 询 &quot;>
</div>
<div align=&quot;center&quot;></div></td>
</tr>
</table></form></td>
</tr>
</table>
[red]whois.asp代码如下:[/red]
<%
On Error Resume Next
Server.ScriptTimeOut=9999999
Function getHTTPPage(Path)
t = GetBody(Path)
getHTTPPage=BytesToBstr(t,&quot;GB2312&quot;)
End function
Function GetBody(url)
on error resume next
Set Retrieval = CreateObject(&quot;Microsoft.XMLHTTP&quot;)
With Retrieval
.Open &quot;Get&quot;, url, False, &quot;&quot;, &quot;&quot;
.Send
GetBody = .ResponseBody
End With
Set Retrieval = Nothing
End Function
Function BytesToBstr(body,Cset)
dim objstream
set objstream = Server.CreateObject(&quot;adodb.stream&quot;)
objstream.Type = 1
objstream.Mode =3
objstream.Open
objstream.Write body
objstream.Position = 0
objstream.Type = 2
objstream.Charset = Cset
BytesToBstr = objstream.ReadText
objstream.Close
set objstream = nothing
End Function
Function Newstring(wstr,strng)
Newstring=Instr(lcase(wstr),lcase(strng))
if Newstring<=0 then
Newstring=Len(wstr)
End Function
%>
<html>
<head>
<title>域名索WhoIs查询</title>
<meta http-equiv=&quot;Content-Type&quot;
content=&quot;text/html;
charset=gb2312&quot;>
</head>
<body>
<p>&amp;nbsp;</p>
<p>&amp;nbsp;</p>
<iframe marginwidth=0 marginheight=0 frameborder=0 bordercolor='#000000' scrolling=no src='http://union.sogou.com/cpc/partner.php?pid=hljec&amp;type=12' width=590 height=95></iframe>
<p><br>
<font color=&quot;#FF0000&quot;><strong>国际顶级域名65元/年,带管理面板 QQ:346654127</strong></font><br>
<br>
<%
domain=request(&quot;domain&quot;)
sArr=split(request(&quot;domain&quot;),&quot;.&quot;)
temp1=sArr(0)
temp2=sArr(1)
ID = Request.QueryString(&quot;domain&quot;)
url=&quot;http://218.30.103.79/cgi-bin/Whois.cgi?domain=&quot;&amp;temp1&amp;&quot;&amp;&quot;&amp;temp2&amp;&quot;=yes&amp;work=whois&quot;
wstr=getHTTPPage(url)
start=Newstring(wstr,&quot;<!-- start -->&quot;)
over=Newstring(wstr,&quot;<!-- end -->&quot;)
body=mid(wstr,start+0,over-start)
response.write body
%>
</p>
<table width=&quot;46%&quot;
border=&quot;0&quot;
cellpadding=&quot;5&quot;
cellspacing=&quot;1&quot;>
<tr>
<td height=&quot;42&quot;
bgcolor=&quot;#FFFFFF&quot;> <FORM name=search_form action='http://search.sohu.com/web' method=get target=_blank>
<input type=&quot;hidden&quot;
name=&quot;pid&quot;
value=&quot;hljec&quot;>
<input name=&quot;query&quot;
type=&quot;text&quot;
value=&quot;关于<%=request(&quot;domain&quot;)%>的状态&quot;
size=&quot;40&quot;>
<input type=&quot;submit&quot;
name=&quot;ss&quot;
value=&quot;查看&quot;
onclick=document.search_form.action='http://search.sohu.com/web' style=&quot;font-size:14px;width=40;height=20&quot;>
&amp;nbsp;
</FORM></td>
</tr>
</table>
<p>&amp;nbsp;</p>
</body>
</html>

请大家帮我看看,谢谢谢谢谢谢谢谢谢了!
 
大家好。下面是我从网上下载的域名查询系统。在本地计算机上调试是成功的,但是一上传至网上后就出现了问题http 405 - 资源被禁止!请各位帮我看一下。谢谢各位了!
代码如下:
[red]index.asp代码如下:[/red]
<%
On Error Resume Next
Server.ScriptTimeOut=9999999
Function getHTTPPage(Path)
t = GetBody(Path)
getHTTPPage=BytesToBstr(t,&quot;GB2312&quot;)
End function
Function GetBody(url)
on error resume next
Set Retrieval = CreateObject(&quot;Microsoft.XMLHTTP&quot;)
With Retrieval
.Open &quot;Get&quot;, url, False, &quot;&quot;, &quot;&quot;
.Send
GetBody = .ResponseBody
End With
Set Retrieval = Nothing
End Function
Function BytesToBstr(body,Cset)
dim objstream
set objstream = Server.CreateObject(&quot;adodb.stream&quot;)
objstream.Type = 1
objstream.Mode =3
objstream.Open
objstream.Write body
objstream.Position = 0
objstream.Type = 2
objstream.Charset = Cset
BytesToBstr = objstream.ReadText
objstream.Close
set objstream = nothing
End Function
Function Newstring(wstr,strng)
Newstring=Instr(lcase(wstr),lcase(strng))
if Newstring<=0 then
Newstring=Len(wstr)
End Function
%>
<%
if request(&quot;domain&quot;)<>&quot;&quot;
then
url=&quot;https://www.onlinenic.com//cgi-bin/4e/check_domain.cgi?type_encode=1&amp;domain=&quot;&amp;request(&quot;domain&quot;)&amp;&quot;&amp;root=&quot;&amp;request(&quot;root&quot;)
wstr=getHTTPPage(url)
'response.write Instr (wstr,&quot;可以注册&quot;)
start=Newstring(wstr,&quot;查询域名结果&quot;)
over=Newstring(wstr,&quot;按此返回&quot;)
body=mid(wstr,start+0,over-start)
body=replace(body,&quot;查询域名结果&quot;,&quot;&quot;)
body=replace(body,&quot;</b></font></div><br>&quot;,&quot;&quot;)
body=replace(body,&quot;javascript:tmp=openwin('/cgi-bin/4e/whois.cgi?domain=&quot;,&quot;whois.asp?domain=&quot;)
body=replace(body,&quot;')&quot;,&quot;&quot;)
body=replace(body,&quot;<center><a href='http://www.OnlineNIC.com/4e/'>&quot;,&quot;&quot;)
body=replace(body,&quot;<b>没有被注册</b>&quot;,&quot;<b><a href='http://www.reg.com?reg.asp?domain=&quot;+request(&quot;domain&quot;)+request(&quot;root&quot;)+&quot;'>没有被注册</a></b>&quot;)
response.write body
end if
%>
<p align=&quot;center&quot;>
<iframe marginwidth=0 marginheight=0 frameborder=0 bordercolor='#000000' scrolling=no src='http://union.sogou.com/cpc/partner.php?pid=hljec&amp;type=12' width=590 height=95></iframe>
</p>
<table width=&quot;40%&quot;
border=&quot;0&quot;
align=&quot;center&quot;
cellpadding=&quot;5&quot;
cellspacing=&quot;1&quot;
bgcolor=&quot;#999999&quot;>
<tr>
<td height=&quot;26&quot;
bgcolor=&quot;efefef&quot;>域名查询系统</td>
</tr>
<tr>
<td bgcolor=&quot;#FFFFFF&quot;><form name=&quot;form1&quot;
method=&quot;post&quot;
action=&quot;&quot;><table width=&quot;100%&quot;
border=&quot;0&quot;
cellspacing=&quot;1&quot;
cellpadding=&quot;1&quot;>
<tr>

<td height=&quot;36&quot;> <div align=&quot;center&quot;>www.
<input type=&quot;text&quot;
name=&quot;domain&quot;>
<select name=&quot;root&quot;
id=&quot;select&quot;>
<option value=&quot;.cn&quot;
selected>.cn</option>
<option value=&quot;.com&quot;>.com</option>
<option value=&quot;.net&quot;>.net</option>
<option value=&quot;.org&quot;>.org</option>
<option value=&quot;.com.cn&quot;>.com.cn</option>
<option value=&quot;.net.cn&quot;>.net.cn</option>
<option value=&quot;.gov.cn&quot;>.gov.cn</option>
</select>
</div></td>

</tr>
<tr>
<td height=&quot;35&quot;>
<div align=&quot;center&quot;>
<input type=&quot;submit&quot;
name=&quot;Submit&quot;
value=&quot;
查 询 &quot;>
</div>
<div align=&quot;center&quot;></div></td>
</tr>
</table></form></td>
</tr>
</table>
[red]whois.asp代码如下:[/red]
<%
On Error Resume Next
Server.ScriptTimeOut=9999999
Function getHTTPPage(Path)
t = GetBody(Path)
getHTTPPage=BytesToBstr(t,&quot;GB2312&quot;)
End function
Function GetBody(url)
on error resume next
Set Retrieval = CreateObject(&quot;Microsoft.XMLHTTP&quot;)
With Retrieval
.Open &quot;Get&quot;, url, False, &quot;&quot;, &quot;&quot;
.Send
GetBody = .ResponseBody
End With
Set Retrieval = Nothing
End Function
Function BytesToBstr(body,Cset)
dim objstream
set objstream = Server.CreateObject(&quot;adodb.stream&quot;)
objstream.Type = 1
objstream.Mode =3
objstream.Open
objstream.Write body
objstream.Position = 0
objstream.Type = 2
objstream.Charset = Cset
BytesToBstr = objstream.ReadText
objstream.Close
set objstream = nothing
End Function
Function Newstring(wstr,strng)
Newstring=Instr(lcase(wstr),lcase(strng))
if Newstring<=0 then
Newstring=Len(wstr)
End Function
%>
<html>
<head>
<title>域名索WhoIs查询</title>
<meta http-equiv=&quot;Content-Type&quot;
content=&quot;text/html;
charset=gb2312&quot;>
</head>
<body>
<p>&amp;nbsp;</p>
<p>&amp;nbsp;</p>
<iframe marginwidth=0 marginheight=0 frameborder=0 bordercolor='#000000' scrolling=no src='http://union.sogou.com/cpc/partner.php?pid=hljec&amp;type=12' width=590 height=95></iframe>
<p><br>
<font color=&quot;#FF0000&quot;><strong>国际顶级域名65元/年,带管理面板 QQ:346654127</strong></font><br>
<br>
<%
domain=request(&quot;domain&quot;)
sArr=split(request(&quot;domain&quot;),&quot;.&quot;)
temp1=sArr(0)
temp2=sArr(1)
ID = Request.QueryString(&quot;domain&quot;)
url=&quot;http://218.30.103.79/cgi-bin/Whois.cgi?domain=&quot;&amp;temp1&amp;&quot;&amp;&quot;&amp;temp2&amp;&quot;=yes&amp;work=whois&quot;
wstr=getHTTPPage(url)
start=Newstring(wstr,&quot;<!-- start -->&quot;)
over=Newstring(wstr,&quot;<!-- end -->&quot;)
body=mid(wstr,start+0,over-start)
response.write body
%>
</p>
<table width=&quot;46%&quot;
border=&quot;0&quot;
cellpadding=&quot;5&quot;
cellspacing=&quot;1&quot;>
<tr>
<td height=&quot;42&quot;
bgcolor=&quot;#FFFFFF&quot;> <FORM name=search_form action='http://search.sohu.com/web' method=get target=_blank>
<input type=&quot;hidden&quot;
name=&quot;pid&quot;
value=&quot;hljec&quot;>
<input name=&quot;query&quot;
type=&quot;text&quot;
value=&quot;关于<%=request(&quot;domain&quot;)%>的状态&quot;
size=&quot;40&quot;>
<input type=&quot;submit&quot;
name=&quot;ss&quot;
value=&quot;查看&quot;
onclick=document.search_form.action='http://search.sohu.com/web' style=&quot;font-size:14px;width=40;height=20&quot;>
&amp;nbsp;
</FORM></td>
</tr>
</table>
<p>&amp;nbsp;</p>
</body>
</html>

请大家帮我看看,谢谢谢谢谢谢谢谢谢了!
 
被封IP了
 
http://dei.gdou.com/blog/tiediy/archive/2004/11/23/1807.aspx
据说把method修改成get就好了,楼主不烦测一下,
 
谢谢chenybin,真的解决了呢。呵呵。就是要改成get就可以了。太谢谢了。
 
多人接受答案了。
 
顶部