Ниже приводится исходный код, пожалуйста, назовите его. ASP -файл.
Кода -копия выглядит следующим образом:
<metahttp-equiv = "content-type" content = "text/html; charset = gb2312">
<%
ifrequest ("action") = "1" Тогда
Word = запрос ("Word")
url = запрос ("url")
ifword <> "" Тогда
getCategories ()
ifurl <> "" Тогда
getCategories2 ()
эндиф
эндиф
эндиф
FunctiongetCategories ()
response.write ("<b> '" & word & "" Ключевое слово входит в число 10 ведущих веб -сайтов в рейтинге поиска Google! </b> <br> ")
OnerRorResumenext
Dimoxmlhttp
Рамокатегории
DimbodyText
Dimpos, pos1
Setoxmlhttp = createObject ("microsoft.xmlhttp")
http = "http://www.google.com/search?q=" & word & "& hl = en-cn"
oxmlhttp.open "Get", http, false
oxmlhttp.send
BodyText = oxmlhttp.responsebody
BodyText = byTestobstr (BodyText, "UTF-8")
Pos = instr (bodytext, "<body")
pos1 = instr (bodytext, "</body>")
BodyText = Mid (BodyText, POS, POS1)
Pos = instr (bodytext, "<div>")
BodyText = Mid (BodyText, POS)
pos1 = instr (bodytext, "</div>")
BodyText = Mid (BodyText, 1, POS1)
'response.write ("::::" & BodyText & "::::")
BodyText = split (bodyText, "<pclass = g>")
fori = 1to10
Pos = instr (bodytext (i), "</a>")
thet = mid (bodytext (i), 1, pos+3)
Pos = instr (bodytext (i), "<spandir = ltr>")
theu = mid (bodytext (i), pos)
pos1 = instr (theu, "</span>")
theu = mid (theu, 1, pos1-1)
response.write ("t:" & thet & "<br>")
response.write ("u:" & theu & "<br> <hr>")
следующий
Setoxmlhttp = ничего
iferr.number <> 0then
Был ответ ошибки. Writh "response.write, Ошибка Ошибка:" & err.description & "<br> Источник ошибки" & err.source
response.end ()
эндиф
Конечная функция
FunctiongetCategories2 ()
OnerRorResumenext
Dimoxmlhttp'asobject
Dimocategories'asobject
DimbodyText
Dimpos, pos1
Setoxmlhttp = createObject ("microsoft.xmlhttp")