<%@Language = "vbscript" codepage = "936"%>
<!-#include file = "conn.asp"->
<!-#include file = "inc/function.asp"->
<! Doctype html public "-// w3c // dtd html 4.01 transitional // en" "http://www.w3.org/tr/html4/loose.dtd">
<html>
<голова>
<title> без названия документ </title>
<meta http-equiv = "content-type" content = "text/html; charset = gb2312">
<meta http-equiv = "refresh" content = "300; url = reque_house.asp">
</head>
<тело>
<%
при ошибке резюме следующим
'
Server.ScriptTimeout = 999999
'===============================================================================
'Функция кодирования персонажа
'===========================================================================
Функция Bytestobstr (Body, Code)
Dim objstream
Установить objstream = server.createObject ("adodb.stream")
objstream.type = 1
objstream.mode = 3
objstream.open
objstream.write Тело
objstream.position = 0
objstream.type = 2
objstream.charset = code
Bytestobstr = objstream.readtext
objstream.close
установить objstream = ничего
Конечная функция
'Принесите позицию возникновения строки строки в другой строке
Функция Newsstring (WSTR, STRNG)
Newsstring = instr (Lcase (WSTR), Lcase (Strng))
Если Newsstring <= 0, то Newsstring = Len (WSTR)
Конечная функция
'Заменить строковую функцию
Функция Replacestr (Ori, Str1, Str2)
Replacestr = reply (ori, str1, str2)
конечная функция
'===========================================================================
Функция readxml (URL, код, запуск, концы)
SET OSEND = 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)
конечная функция
Функциональный субстрат (тело, начало, концы)
start = instr (body, start)
Substr = mid (body, start+len (start) +1)
ENDS = instr (substr, conns)
Substr = слева (substr, ends-1)
конечная функция
Dim GetCont, NewsContent
DIM URL, заголовок
url = "http: //www.lry.com" 'Новости url snowky.com
getCont = readxml (url, "gb2312", "<table class = k20" "," </table> ")
getCont = regexhtml (getCont)
Dim Keyid, Newsclass, город, позиция, HouseType, уровень, район, цена, демостера
Dim Contactman, контакт
для i = 2 до ubund (getCont)
response.write (getCont (i) & "__ <br>")
Templink = mid (getCont (i), instr (getCont (i), "href =" "")+6, instr (getCont (i), "" onclick ")-10)