Die Codekopie lautet wie folgt:
<%@Sprache = "vbscript" Codepage = "936"%>
<! DocTypehtmlPublic "-// w3c // dtdhtml4.01Transitional // en" "http://www.w3.org/tr/html4/loose.dtd">
<html>
<kopf>
<metahttp-äquiv = "content-type" content = "text/html; charSet = gb2312">
<title> Google -Value -Abfrageprogramm </title>
</head>
<body> <h3> Geben Sie die URL ein und fragen Sie den GooglePageRank -Wert </h3> ab
<formname = "form1" methode = "post" action = "? Act = OK">
<P> Geben Sie die URL ein
<inputType = "text" name = "domain">
<inputType = "subieren" name = "suruging" value = "subieren">
</p>
</form>
<%
iftrim (request.queryString ("act") = "ok" dann
Domain = trim (request.form ("domain"))
Ifdomain <> "" dann
Response.write ("<b>" & Domain & "</b> 's GooglePageRank -Wert ist <fontcolor = red>" & getPr (Domain) & "</font>")
Endif
Endif
FunctionGetpr (Domäne)
getContent = Geturl ("http://so.5eo.com/pr/rank.asp?domain=" & Domain)
getPrline = regexptext (getContent, "get.* (// d).
getPr = regexptext (getPrline, "// s // d // s"))
Endfunktion
Funktionsstr (vin)
Dimstrreturn, i, thischarcode, Innercode, Hight8, Low8, NextCharcode
Streturn = ""
Fei = 1tolenb (vin)
Thischarcode = ascb (Midb (vin, i, 1))
IFTHISCHARCODE <& H80Then
Streturn = Streturn & chrt (thisharcode)
Anders
NextCharcode = ASCB (Midb (Vin, I+1,1))
Streturn = Streturn & chrt (clng (thischarcode)*& h100+cint (NextCharCode))
i = i+1
Endif
Nächste
BSTR = Streturn
Endfunktion
Functionurl (URL)
SetRevalal = server.createObject ("microsoft.xmlhttp"))
Withrieval
.Open "GET", URL, falsch
.SetRequestheader "Content-Typ", "Anwendung/x-www-form-urlencoded"
.Schicken
Geturl = .ResponseBody
Endwith
SetReval = nichts
Geturl = BSTR (Geturl)
Endfunktion
FunktionReGexptext (STRNG, Regstr)
"Dimregex, Match, Matches" erstellt Variablen.
SetRegex = newRegexp 'erstellt einen regulären Ausdruck.
regex.pattern = regstr 'set modus.
regex.ignorecase = true 'setzen Sie, ob es sich um einen Fall sensible.