La copia del código es la siguiente:
<%@Idioma = "vBscript" Codepage = "936"%>
<! DocTypehtmlPublic "-// w3c // dtdhtml4.01transitional // en" "http://www.w3.org/tr/html4/loose.dtd">
<html>
<Evista>
<metahttp-equiv = "content-type" content = "text/html; charset = gb2312">
<title> Programa de consulta de valor de GooglePR </title>
</ablo>
<Body> <H3> Ingrese la URL y consulte el valor de GooglePagerank </h3>
<FormName = "Form1" Method = "Post" Action = "? Act = Ok">
<p> Entra en la URL
<inputType = "text" name = "dominio">
<inputType = "Subt" name = "Subt" Value = "Subt">
</p>
</form>
<%
iftrim (request.querystring ("acto")) = "ok" entonces
dominio = trim (request.form ("dominio"))
ifdomain <> "" entonces
Response.Write ("<b>" & Domain & "</b> El valor de Googlepagerank es <fontcolor = rojo>" & getpr (dominio) y "</font>")
endif
endif
FunctetPr (dominio)
getContent = getUrl ("http://so.5eo.com/pr/rank.asp?domain=" & dominio)
getPrline = RegexPtext (getContent, "get.* (// d).* Puntos en GooglePagerank Calificación completa de 10 puntos")
getPr = regexPtext (getPrline, "// s // d // s")
Función final
FunctebStr (VIN)
Dimstrreturn, I, ThisCharcode, InnerCode, Hight8, Low8, NextCharcode
strreturn = ""
Fori = 1TolenB (vin)
ThisCharCode = ASCB (MidB (Vin, I, 1))
Ifthischarcode <& h80Then
strreturn = strreturn & chr (thisCharcode)
Demás
Nextcharcode = ascb (midb (vin, i+1,1))
strreturn = strreturn & chr (clng (thisCharCode)*& H100+cint (nextcharcode)))
i = i+1
Endif
Próximo
bstr = strreturn
Función final
FunctEgetUrl (URL)
Setretrieval = server.createObject ("Microsoft.xmlhttp")
Withrrieval
.Preen "Get", url, falso
.SetRequestHeader "Content-type", "Application/X-www-form-urlencoded"
.Enviar
GetUrl = .ResponseBody
Fin
SetRetrreieval = nada
GetURL = bstr (getURL)
Función final
FunctionRegExPtext (strng, regstr)
'Dimregex, Match, Matches' crea variables.
SetRegex = NewGEXP 'crea una expresión regular.
regex.pattern = Regstr 'Modo de conjunto.
regex.ignorecase = true 'Establecer si es sensible a la caja.