Das Folgende ist der Quellcode, bitte nennen Sie ihn als .asp -Datei
Die Codekopie lautet wie folgt:
<%
bpn = request ("bpn")
if (bpn = "") dann
BPN = "0"
Endif
intbpn = cint (BPN)
IFREQUEST ("Action") = "1" dann
Word = Request ("Word")
url = request ("url")
Ifword <> "" dann
getCategories ()
ifurl <> "" dann
GetCategories2 ()
Endif
Endif
Endif
FunctionGetCategories ()
response.write ("<b> '" & word & "' Schlüsselwort gehört zu den Top 10 Websites im Baidu -Suchranking! </b> <br>"))
onErrorresumeNext
Dimoxmlhttp
Dimokategorien
DimbodyText
Dimpos, POS1
Setoxmlhttp = createObject ("microsoft.xmlhttp"))
oxmlhttp.open "get", "http://www.baidu.com/baidu?word=" & word, false
oxmlhttp.send
BodyText = oxmlhttp.responseBody
BodyText = byTestObstr (bodyText, "gb2312")
Pos = instr (bodytext, "<body")
pos1 = instr (bodytext, "</body>")
BodyText = Mid (BodyText, POS, POS1)
BodyText = split (bodyText, "<table")
ST = 5
fei = 1to10
thei = st+i
Pos = instr (bodytext (thei), "<td")
pos1 = instr (bodytext (thei), "</td>")
Body = Mid (BodyText (Thei), Pos, Len (BodyText (thei))-Pos)
Body1 = Split (Körper, "<br>")
Titel = Body1 (0)
Theurl = Body1 (2)
theurl = ersetzen (theurl, "Mehr Ergebnisse auf", "")
response.write ("t:" & title)
response.write ("<br>")
response.write ("u:" & theurl)
response.write ("<br> <hr>")
nächste
Setoxmlhttp = nichts
Ifr.number <> 0Then
Es gab eine Fehlerantwort. "Antwort" Antwort.
Antwort.end ()
Endif
Endfunktion
FactionGetCategories2 ()
onErrorresumeNext
Dimoxmlhttp'asObject
Dimocategories'asObject
DimbodyText
Dimpos, POS1
Setoxmlhttp = createObject ("microsoft.xmlhttp"))