asp如何实现获取页面(结局立即给分)!

goodmanh 2004-10-27 05:08:24

1.每次买域名都是到服务商网站上一个一个试,我想做个程序,能够用循环的方法穷举我要的网址,然后提交,看结果有没有人注册!

2.这类试于查看google上某一网址网站排名的软件!

具体思路,是不是先把自己要查的网址(域名)提交,然后把返回页面抓过来,然后搜找关键字?

有做过的朋友给点思路,或程序!


cuijun96@hotmail.com
...全文
82 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
goodmanh 2004-10-28
  • 打赏
  • 举报
回复
好的,我试试
bbcbs 2004-10-27
  • 打赏
  • 举报
回复
我写过一个域名查询,希望是你要的。。。

<%@ Language=VBScript %>
<HTML>
<HEAD>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script language=javascript1.2>

function CheckIfEnglish( String )
{
var Letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890-";
var i;
var c;
if(String.charAt( 0 )=='-')
return false;
if( String.charAt( String.length - 1 ) == '-' )
return false;
for( i = 0; i < String.length; i ++ )
{
c = String.charAt( i );
if (Letters.indexOf( c ) < 0)
return false;
}
return true;
}
function submitchecken() {

if (document.checkdomain.domain.value == "") {
alert("请输入您要查询的英文域名。");
document.checkdomain.domain.focus();
return false;
}

if (!CheckIfEnglish(document.checkdomain.domain.value )) {
alert("\t注意:在查询英文域名时应输入英文不能输入中文及非法字符!\n域名由不分大小写的英文字母和数字组成,除了开头和结尾以外,中间也可以含有“-”(即连字符或称减号)最大长度为26个字符;");
document.checkdomain.domain.focus();
return false;
}

return true;
}
</script>
<link href="../css/main.css" rel="stylesheet" type="text/css">
</HEAD>
<center>
<BODY leftmargin="0" topmargin="0">
<table width="762" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>td>
</tr>
<tr>
<td><table width="100%" border="0" cellpadding="0" cellspacing="0" background="../images/bgtable.gif">
<tr>
<td width="169" align="center" valign="top"><img src="../images/domain_left.gif" width="169" height="349"></td>
<td><table align="center" width="95%" border="0" cellpadding="0" cellspacing="0">
<tr><td><%
on error resume next
Private d_exsit
Dim Retrieval
Dim Domain
Dim TakenHTML

Function GetURL(url)
Set Retrieval = Server.CreateObject("Microsoft.XMLHTTP")
With Retrieval
.Open "GET", url, False, "", ""
.Send
GetURL = .responsebody
End With
Set Retrieval = Nothing
End Function
Domain = Replace(Request.Form("domain"),"www.","") & "." & Request.Form("ext")
ext=replace(request.form("ext"),".","")
if Domain=".com" or Request.Form("domain")="" then
Response.Write ("<script>alert('看看您什么忘记填写了?没有填写域名吧?');javascript:history.back(1)</script>")
response.end
end if
'TakenHTML = GetURL("http://218.30.103.79/cgi-bin/Check.cgi?domain="&request.form("domain")&"&"&ext&"=yes")
TakenHTML = GetURL("http://218.30.103.79/cgi-bin/Whois.cgi?domain="&request.form("domain")&"&"&ext&"=yes&work=whois")
'TakenHTML = GetURL("http://www.china-channel.com/checkdomain.asp?action=whois&domain="&Domain)
d_exsit=1
Function bin2str(binstr)
Dim varlen,clow,ccc,skipflag
skipflag=0
ccc = ""
varlen=LenB(binstr)
For i=1 To varlen
If skipflag=0 Then
clow = MidB(binstr,i,1)
If AscB(clow) > 127 Then
ccc =ccc & Chr(AscW(MidB(binstr,i+1,1) & clow))
skipflag=1
Else
ccc = ccc & Chr(AscB(clow))
End If
Else
skipflag=0
End If
Next
bin2str = ccc
End Function
TakenHTML=bin2str(TakenHTML)

if InStr(TakenHTML,"No entries") > 1 then

Response.Write Domain & "出错了,请返回!<br><br>"
else
if InStr(TakenHTML,"No match") > 1 then %>
<br><font color="red">祝贺您:</font> <br><br>
<font color="#000000">您想注册的域名</font> <font color="#0099FF"><% =Domain %></font> <font color="#000000">还没有被注册</font>
<p><font color="#000000"><a href="domainlogin.asp">点击这里,开始注册您的域名</a></font></p>
<% else %>
<br><font color="red">对不起:</font><br><br>
<font color="#000000">您想注册的域名</font>  <font color="#0099FF"><% =Domain %></font> <font color="#000000">已经被注册了!</font><br>
<form method="post" action="domain.asp" name="checkdomain" id=Form1>
<font color="#000000">www.</font>
<input type="text" name="domain" id=Text1>
<select name="ext" id=Select1>
<option selected value="com">.com</option>
<option value="net">.net</option>
<option value="org">.org</option>
<option value="gov">.gov</option>
<option value="cn">.cn</option>
<option value="cc">.cc</option>
<option value="tv">.tv</option>
<option value="com.cn">.com.cn</option>
<option value="net.cn">.net.cn</option>
<option value="org.cn">.org.cn</option>
<option value="gov.cn">.gov.cn</option>
<option value="biz">.biz</option>
<option value="info">.info</option>
</select>
<input type="submit" name="Submit" value="查询" id=Submit1 onClick = "return submitchecken();">
</form>
<%=domain%>的详细信息:<br>
<pre><% =dowith() %></pre>

<% end if
end if
Function dowith()
Dim lStrURL
Dim pagebefore
Dim pageafter
Dim tempcontent
Dim pagestart
Dim pageend
dim temps
pageafter = "<PRE>"
pagebefore = "</PRE>"
tempcontent = TakenHTML
if d_exsit<>0 then
pagestart = InStr(1,tempcontent, pageafter,1)
If pagestart = 0 Then
dowith = "<font color=""red"">信息超时!</font>"
d_exsit = 3
Exit Function
Else
pagestart = pagestart + Len(pageafter) + 1
pageend = InStr(pagestart, tempcontent, pagebefore,1)
If pageend = 0 Then
dowith = "<font color=""red"">信息超时!</font>"
d_exsit = 3
Exit Function
Else
pageend = pageend - pagestart '得到内容长度
tempcontent = Mid(tempcontent, pagestart, pageend)
End If
End If
Set pageregexp = New RegExp
pageregexp.Global = True
pageregexp.Pattern = "<[^>]*>"
tempcontent = pageregexp.Replace(tempcontent, "")
Set pageregexp = Nothing
dowith = tempcontent
End If
End Function
%>


<a href="../">返回首页</a></td></tr></table></td>
</tr>
</table>
</td>
</tr>
<tr>
<td></td>
</tr>
</table>
</BODY></center>
</HTML>
davs 2004-10-27
  • 打赏
  • 举报
回复
up ,want

28,390

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧