手机
当前位置:查字典教程网 >编程开发 >ASP教程 >PR值查询代码制作
PR值查询代码制作
摘要:复制代码代码如下:GooglePR值查询程序输入网址,查询GooglePageRank值输入网址

复制代码 代码如下:

<%@LANGUAGE="VBSCRIPT"CODEPAGE="936"%>

<!DOCTYPEHTMLPUBLIC"-//W3C//DTDHTML4.01Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>

<metahttp-equiv="Content-Type"content="text/html;charset=gb2312">

<title>GooglePR值查询程序</title>

</head>

<body><h3>输入网址,查询GooglePageRank值</h3>

<formname="form1"method="post"action="?act=ok">

<p>输入网址

<inputtype="text"name="domain">

<inputtype="submit"name="Submit"value="提交">

</p>

</form>

<%

iftrim(Request.QueryString("act"))="ok"then

domain=trim(Request.Form("domain"))

ifdomain<>""then

Response.Write("<b>"&domain&"</b>的GooglePageRank值为<fontcolor=red>"&getPr(domain)&"</font>")

endif

endif

FunctiongetPr(domain)

getContent=GetURL("http://so.5eo.com/pr/rank.asp?domain="&domain)

getPrLine=RegExpText(getContent,"在GooglePageRank满分10分评价中获得.*(d).*分")

getPr=RegExpText(getPrLine,"sds")

EndFunction

Functionbstr(vIn)

DimstrReturn,i,ThisCharCode,innerCode,Hight8,Low8,NextCharCode

strReturn=""

Fori=1ToLenB(vIn)

ThisCharCode=AscB(MidB(vIn,i,1))

IfThisCharCode<&H80Then

strReturn=strReturn&Chr(ThisCharCode)

Else

NextCharCode=AscB(MidB(vIn,i+1,1))

strReturn=strReturn&Chr(CLng(ThisCharCode)*&H100+CInt(NextCharCode))

i=i+1

EndIf

Next

bstr=strReturn

EndFunction

FunctionGetURL(url)

SetRetrieval=Server.CreateObject("Microsoft.XMLHTTP")

WithRetrieval

.Open"GET",url,false

.setRequestHeader"Content-Type","application/x-www-form-urlencoded"

.Send

GetURL=.ResponseBody

EndWith

SetRetrieval=Nothing

GetURL=bstr(GetURL)

EndFunction

FunctionRegExpText(strng,regStr)

'DimregEx,Match,Matches'建立变量。

SetregEx=NewRegExp'建立正则表达式。

regEx.Pattern=regStr'设置模式。

regEx.IgnoreCase=True'设置是否区分字符大小写。

regEx.Global=True'设置全局可用性。

SetMatches=regEx.Execute(strng)'执行搜索。

ForEachMatchinMatches'遍历匹配集合。

RetStr=RetStr&Match.value'&"|||"

Next

RegExpText=RetStr

setregEx=nothing

EndFunction

%>

</body>

</html>

【PR值查询代码制作】相关文章:

分页代码

使用VB将ASP代码封装到DLL文件

ASP 微信公共平台接口实现代码

可以查询百度排名的asp源码放送了

asp防止网页刷新代码

验证码识别技术

ASP无组件分页实现思路及代码

统计有多少行JS代码和ASP代码

ASP部分代码介绍

asp防止刷新功能实现代码

精品推荐
分类导航