A cópia do código é a seguinte:
<%@Idioma = "vBScript" codePage = "936"%>
<!-#incluirfile = "Conn.asp"->
<!-#incluirfile = "inc/function.asp"->
<!
"http://www.w3.org/tr/html4/loose.dtd">
<html>
<head>
<title> UntitledDocument </ititle>
<metahttp-equiv = "content-type" content = "text/html; charset = gb2312">
<metahttp-equiv = "refresch" content = "300; url = role_house.asp">
</head>
<Body>
<%
OnErrorReSumenext
'
Server.scriptTimeout = 999999
'================================================================================
'Função de codificação de caracteres
'=========================================================================
FunctionByTestobstr (corpo, código)
DIMOBJSTREAM
setobjstream = server.createObject ("adodb.stream")
objstream.type = 1
objstream.mode = 3
objstream.open
objstream.writebody
objstream.Position = 0
objstream.type = 2
objstream.charset = código
Bytestobstr = objStream.readText
objstream.close
setobjstream = nada
Função final
'Busca a posição de ocorrência da sequência de linha em outra string
FunctionNewString (WSTR, STRNG)
Nestring de notícias = Instr (lcase (WSTR), lcase (strng))
ifNewString <= 0ThenNewString = len (WSTR)
Função final
'Substitua a função da string
functionReplacest (ori, str1, str2)
Replacest = reply (ori, str1, str2)
Função final
'=========================================================================
functionReadxml (URL, código, start, termina)
setossend = createObject ("Microsoft.xmlHttp")
SourCecode = Osend.open ("Get", URL, FALSE)
Osend.send ()
Readxml = bytestobstr (Osend.Responsebody, código)
start = instrum (readxml, start)
Readxml = mid (readxml, start)
termina = instrum (readxml, extremidades)
Readxml = esquerda (readxml, ends-1)
Função final
funçõesbstr (corpo, início, termina)
start = instrum (corpo, start)
Substr = médio (corpo, start+len (start) +1)
ENDS = Instr (Substr, Ends)
Substr = esquerda (substr, ends-1)
Função final
DiMgetCont, NewsContent
Dimurl, título
url = "http: //www.***.com" 'Site de notícias
getCont = readxml (url, "gb2312", "<tableClass = k2border =" "0" "", "</ table>")
getCont = regexhtml (getCont)
DimkeyId, classe de notícias, cidade, posição, housetype, nível, área, preço, demostra
Dimcontactman, contato
fori = 2toubund (getCont)
Response.write (getCont (i) e "__ <br>")
Templink = MID (getCont (i), Instr (getCont (i), "href =" "")+6, Instr (getCont (i), "" "
OnClick ")-10)
templink = substituir (templink, "../", "")
Response.Write (I & ":" & Templink & "<br>")