⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pr_action.asp

📁 深度学习整站系统 v1.10 1、将整个目录上传到虚拟空间
💻 ASP
📖 第 1 页 / 共 4 页
字号:
<%Response.Buffer = false%>
<%
' *** Restrict Access To Page: Grant or deny access to this page
MM_authorizedUsers="999"
MM_authFailedURL="../index.asp"
MM_grantAccess=false
If Session("MM_Username") <> "" Then
  If (false Or CStr(Session("MM_UserAuthorization"))="") Or _
         (InStr(1,MM_authorizedUsers,Session("MM_UserAuthorization"))>=1) Then
    MM_grantAccess = true
  End If
End If
If Not MM_grantAccess Then
  MM_qsChar = "?"
  If (InStr(1,MM_authFailedURL,"?") >= 1) Then MM_qsChar = "&"
  MM_referrer = Request.ServerVariables("URL")
  if (Len(Request.QueryString()) > 0) Then MM_referrer = MM_referrer & "?" & Request.QueryString()
  MM_authFailedURL = MM_authFailedURL & MM_qsChar & "accessdenied=" & Server.URLEncode(MM_referrer)
  Response.Redirect(MM_authFailedURL)
End If
%>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
	td,body,p { font-size: 12px; font-family: 宋体;color:#666666}
-->
</style>
<body leftmargin="0" topmargin="0">
<%	
	'//<summary>
	'//是否打开 ASPHTTP 属性 1为打开 0为关闭
	'//是否打开 ProxyIP 属性 1为打开 0为关闭
	'//ProxyIP 通过内网运行,采用ASPHTTP组件可以通过代理采集到数据,可以把注释去掉,设置正确的IP+端口就可
	'//</summary>
	AspHttpOpen=0
	ProxyIP=0
	
	'//设置计数器
	startime=timer()

	siteinfo=trim(request("site"))
	sitename=trim(request("sitename"))

	all=trim(request("all"))
	if all="" then all="n"
	
	if siteinfo="" then
		call Error(1)
	elseif sitename="" then
		call Error(2)
	end if
select  case siteinfo
		case "google"
			google sitename,all
		case "baidu"
			baidu sitename,all
		case "msn"
			msn sitename,all
		case "yahoo"
			yahoo sitename,all
		case "yisou"
			yisou sitename,all
		case "zhongsou"
			zhongsou sitename,all
		case "sina"
			sina sitename,all
		case "links"
			links sitename,all
		case "sohu"
			sohu sitename,all
		case "163"
			do163 sitename,all
		case "qq"
			qq sitename,all
		case "alexa"
			call alexa(sitename)
		case "whois"
			call whois(sitename)
		case "uptimebot"
			call uptimebot(sitename)
		case "GoogleRank"
			call GoogleRank(sitename)
		case "key"
			call keys(sitename)
		case else		
			call Error(3)
end select
%>
Time:<%=fix((timer()-startime)*1000)%>ms
<%


'// <summary>
'// 错误显示函数,暂定四个预错误
'// </summary>
Sub Error(str)

	select  case str
			case 1
				response.write "<BR>&nbsp;&nbsp;搜索引擎为空</a>"
			case 2
				response.write "<BR>&nbsp;&nbsp;站点名字为空</a>"
			case 3
				response.write "<BR>&nbsp;&nbsp;你输入的搜索引擎本程序不支持</body></html>"
			case 4
				response.write "<BR>&nbsp;&nbsp;未知错误--抓取不到数据 请<font color=blue><a href=javascript:location.reload();>刷新</a></font>重试</body></html>"
	end select
	response.end
End Sub

'=============================处理文件====================================

'// <summary>
'// GooGle 收录查询
'// Url=http://www.GooGle.com/search?hl=zh-CN&q=
'// </summary>
Sub google(str,all)

	call print_do("google")

	if all="n" then
		url="http://www.google.com/search?hl=zh-CN&q=site%3A"&str
	else
		strext=split(str,".")
		url="http://www.google.com/search?hl=zh-CN&q="&strext(0)
	end if

	If IsObjInstalled("AspHTTP.Conn")=true Then
		str= getaspHTTPPage(url)
	else
		str= getHTTPPage(url)
	End if
	
	if str="" then
		Call Error(4)
	else
		set reg=new Regexp
			reg.Multiline=True
			reg.Global=False
			reg.IgnoreCase=true
				
			If IsObjInstalled("AspHTTP.Conn")=true Then
					str_top="<font size=-1 color=>"
					str_bottom="查询结果,以下是第"
					reg.Pattern=""&str_top&"((.|\n)*?)"&str_bottom&""
				Set matches = reg.execute(str)
					For Each match1 in matches
						str=match1.Value
					Next
					str = reg.Replace(str,"$1")
				Set matches = Nothing
				Set reg = Nothing
			else
				if all="n" then
					str_top="nowrap><font size=-1 color=>"
					str_bottom="</font>"

					reg.Pattern=""&str_top&"((.|\n)*?)"&str_bottom&""
					Set matches = reg.execute(str)
						For Each match1 in matches
							str=match1.Value
						Next
						str=replace(str,str_top,"")
						str=replace(str,str_bottom,"")
						reg.Pattern="\?<b>((.|\n)*?)</b>"
					Set matches = reg.execute(str)
						For Each match1 in matches
							str=match1.Value
						Next
						str = reg.Replace(str,"$1")
						
				else
						str_top="nowrap><font size=-1 color=>"
						str_bottom="</b>"

					reg.Pattern=""&str_top&"((.|\n)*?)"&str_bottom&""
					Set matches = reg.execute(str)
						For Each match1 in matches
							str=match1.Value
						Next
					Set matches = Nothing
						str=replace(str,str_top,"")
						reg.Pattern="<b>((.|\n)*?)</b>"
					Set matches = reg.execute(str)
						For Each match1 in matches
							str=match1.Value
						Next
				end if
				Set matches = Nothing			
				Set reg = Nothing
			end if
			
			response.write "<BR>"
			response.write "&nbsp;&nbsp;在Google 共找到 "
			
			if str="" or len(str)>200 then
				response.write "还没有收录, <a href="&url&" target=_blank><font color=#cc0000>请点击登陆网站</font></a>"
			else
				response.write str
				response.write " 项&nbsp;&nbsp;"
				response.write "<a href="&url&" target=_blank><font color=#cc0000>点击查看详细信息</font></a>"
			end if
	end if
	response.write "</body></html>"
End Sub

'// <summary>
'// baidu 收录查询
'// Url=http://www.baidu.com/s?wd=
'// </summary>
Sub baidu(str,all)

	call print_do("baidu")

	if all="n" then
		url="http://www.baidu.com/s?wd=site%3A"&str&"&cl=3"
	else
		strext=split(str,".")
		url="http://www.baidu.com/s?wd="&strext(0)&"&cl=3"
	end if

	If IsObjInstalled("AspHTTP.Conn")=true Then
		str= getaspHTTPPage(url)
	else
		str= getHTTPPage(url)
	End if
	
	if str="" then
		Call Error(4)
	else
		set reg=new Regexp
			reg.Multiline=True
			reg.Global=False
			reg.IgnoreCase=true
			str_top="<nobr>"
			str_bottom="</nobr>"
			reg.Pattern=""&str_top&"((.|\n)*?)"&str_bottom&""
			Set matches = reg.execute(str)
				For Each match1 in matches
					str=match1.Value
				Next
			Set matches = Nothing
			Set reg = Nothing
			response.write "<BR>"
			response.write "&nbsp;&nbsp;"
			
			if str="" or len(str)>200 then
				response.write "还没有收录, <a href="&url&" target=_blank><font color=#cc0000>请点击登陆网站</font></a>"
			else
			str_1=split(str,",")
			response.write str_1(0)
			response.write "&nbsp;&nbsp;"
			response.write "<a href="&url&" target=_blank><font color=#cc0000>点击查看详细信息</font></a>"
			end if 
			
	end if
	response.write "</body></html>"
End Sub

'// <summary>
'// msn 收录查询
'// Url=http://search.msn.com/results.aspx?FORM=PERE&q=
'// </summary>
Sub msn(str,all)

	call print_do("msn")		
	if all="n" then
		url="http://search.msn.com/results.aspx?FORM=PERE&q=site%3A"&str
	else
		strext=split(str,".")
		url="http://search.msn.com/results.aspx?FORM=PERE&q="&strext(0)
	end if

	If IsObjInstalled("AspHTTP.Conn")=true Then
		str= getaspHTTPPage(url)
	else
		str= getHTTPPage(url)
	End if
	
	if str="" then
		Call Error(4)
	else
		set reg=new Regexp
			reg.Multiline=True
			reg.Global=False
			reg.IgnoreCase=true
			str_top="<h5>"
			str_bottom="</strong>"
			reg.Pattern=""&str_top&"((.|\n)*?)"&str_bottom&""
			Set matches = reg.execute(str)
				For Each match1 in matches
					str=match1.Value
				Next
			Set matches = Nothing
			Set reg = Nothing
			response.write "<BR>"
			response.write "&nbsp;&nbsp;"
			if str="" or len(str)>200 then
				response.write "还没有收录, <a href="&url&" target=_blank><font color=#cc0000>请点击登陆网站</font></a>"
			else
			str=replace(str,"<h5>","")
			strp=split(str,"of")
			str=strp(ubound(strp))
			response.write str
			response.write "&nbsp;&nbsp;"
			response.write "<a href="&url&" target=_blank><font color=#cc0000>点击查看详细信息</font></a>"
			end if
	end if
	response.write "</body></html>"
End Sub

'// <summary>
'// yahoo 收录查询
'// Url=http://cn.search.yahoo.com/search?ei=zh-cn&fr=sfp&meta=0&p=
'// </summary>
Sub yahoo(str,all)

	call print_do("yahoo")			
	if all="n" then
		url="http://cn.websearch.yahoo.com/search?p=site%3A"&str&"&ei=UTF-8&fl=0&vc=&x=wrt&meta=vl%3Dlang_zh-CN%26vl%3Dlang_zh-TW"
	else
		strext=split(str,".")
		url="http://cn.search.yahoo.com/search?ei=zh-cn&fr=sfp&meta=0&p="&strext(0)
	end if
	
	If IsObjInstalled("AspHTTP.Conn")=true Then
		str= getaspHTTPPage(url)
	else
		str= getHTTPPage(url)
	End if

	if str="" then
		Call Error(4)
	else

	
		set reg=new Regexp
			reg.Multiline=True
			reg.Global=False
			reg.IgnoreCase=true
			
		If IsObjInstalled("AspHTTP.Conn")=true Then
		
				str_top="<h1>网页结果</h1><p>约<strong>"
				str_bottom="</strong>项"
				
				reg.Pattern=""&str_top&"((.|\n)*?)"&str_bottom&""
				Set matches = reg.execute(str)
					For Each match1 in matches
						str=match1.Value
					Next
				str = reg.Replace(str,"$1")	
		else
			if all="n" then
				str_top="<h1>"
				str_bottom="</strong>"
				reg.Pattern=""&str_top&"((.|\n)*?)"&str_bottom&""
				Set matches = reg.execute(str)
					For Each match1 in matches
						str=match1.Value
					Next
						reg.Pattern="strong>((.|\n)*?)</strong>"
					Set matches = reg.execute(str)
						For Each match1 in matches
							str=match1.Value
						Next
					str = reg.Replace(str,"$1")
	
			else	
				str_top="<h1>"
				str_bottom="</strong>"
				reg.Pattern=""&str_top&"((.|\n)*?)"&str_bottom&""
				Set matches = reg.execute(str)
					For Each match1 in matches
						str=match1.Value
					Next
				Set matches = Nothing
						str=replace(str,str_top,"")
						reg.Pattern="strong>((.|\n)*?)</strong>"
					Set matches = reg.execute(str)
						For Each match1 in matches
							str=match1.Value
						Next
					str = reg.Replace(str,"$1")				
			end if
	
		end if
		
			Set matches = Nothing
			Set reg = Nothing
			response.write "<BR>"
			response.write "&nbsp;&nbsp;搜索Yahoo中文网页,共找到"
			if str="" or len(str)>200 then
				response.write "还没有收录, <a href="&url&" target=_blank><font color=#cc0000>请点击登陆网站</font></a>"
			else
			response.write str
			response.write "项&nbsp;&nbsp;"
			response.write "<a href="&url&" target=_blank><font color=#cc0000>点击查看详细信息</font></a>"
			end if
	end if	
	response.write "</body></html>"
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -