Кода -копия выглядит следующим образом:
<%@Language = "vbscript" codepage = "936"%>
<!-#includefile = "conn.asp"->
<!-#includefile = "inc/function.asp"->
<! Doctypehtmlpublic "-// w3c // dtdhtml4.01transitional // en"
"http://www.w3.org/tr/html4/loose.dtd">
<html>
<голова>
<title> UntitledDocument </title>
<metahttp-equiv = "content-type" content = "text/html; charset = gb2312">
<metahttp-equiv = "refresh" content = "300; url = reque_house.asp">
</head>
<тело>
<%
OnerRorResumenext
'
Server.ScriptTimeout = 999999
'===============================================================================
'Функция кодирования персонажа
'===========================================================================
Functionbytestobstr (body, code)
Dimobjstream
setObjStream = server.createObject ("adodb.stream")
objstream.type = 1
objstream.mode = 3
objstream.open
objstream.writebody
objstream.position = 0
objstream.type = 2
objstream.charset = code
Bytestobstr = objstream.readtext
objstream.close
setobjstream = ничего
Конечная функция
'Принесите позицию возникновения строки строки в другой строке
FunctionNewString (WSTR, STRNG)
Newsstring = instr (Lcase (WSTR), Lcase (Strng))
ifnewString <= 0ThenNewString = Len (WSTR)
Конечная функция
'Заменить строковую функцию
functionReplacest (ori, str1, str2)
Replacestr = reply (ori, str1, str2)
конечная функция
'===========================================================================
functionReadXml (URL, код, запуск, концы)
setoSend = createObject ("microsoft.xmlhttp")
Sourcecode = osend.open ("Get", url, false)
osend.send ()
Readxml = bytestobstr (osend.responsebody, code)
start = instr (readxml, start)
Readxml = mid (readxml, start)
Ends = instr (readxml, концы)
Readxml = слева (readxml, ends-1)
конечная функция
functionsubstr (тело, начало, концы)
start = instr (body, start)
Substr = mid (body, start+len (start) +1)
ENDS = instr (substr, conns)
Substr = слева (substr, ends-1)
конечная функция
DimgetCont, NewsContent
Dimurl, заголовок
url = "http: //www.lry.com" 'Новостной веб -сайт
getCont = readxml (url, "gb2312", "<tableclass = k2border =" "0" "", "</table>")
getCont = regexhtml (getCont)
Dimkeyid, Newsclass, город, позиция, HouseType, уровень, район, цена, демостера
Dimcontactman, контакт
fori = 2toubund (getCont)
response.write (getCont (i) & "__ <br>")
Templink = mid (getCont (i), instr (getCont (i), "href =" "")+6, inst (getCont (i), "" "" "
Onclick ")-10)
Templink = reply (Templink, "../", "")
response.write (i & ":" & templink & "<br>")