La copie de code est la suivante:
<% @ Lingots = "vbscript" codepage = "936"%>
<! - # includeFile = "conn.asp" ->
<! - # includeFile = "inc / function.asp" ->
<! Doctypehtmlpublic "- // w3c // dtdhtml4.01transitional // en"
"http://www.w3.org/tr/html4/loose.dtd">
<html>
<adal>
<Title> UntitledDocument </Title>
<Metahttp-Equiv = "Content-Type" Content = "Text / Html; charSet = GB2312">
<Metahttp-Equiv = "Refresh" Content = "300; url = Steal_house.asp">
</ head>
<body>
<%
onerrorresumenext
'
Server.scriptTimeout = 999999
'====================================================================.
'Fonction de codage des caractères
'==================================================================.
FunctionByTestobstr (corps, 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 = rien
Finition de fin
'Reprochez la position d'occurrence de la chaîne de ligne dans une autre chaîne
Functionnewstring (wstr, strng)
Newsstring = instr (lcase (wstr), lcase (strng)))
ifnewstring <= 0TheNewString = Len (WSTR)
Finition de fin
'Remplacer la fonction de chaîne
functionReplacestr (Ori, Str1, Str2)
Remplacestr = remplacer (ORI, STR1, STR2)
finition de fin
'==================================================================.
functionReadxml (URL, code, démarrage, fin)
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)
se termine = instant (readxml, fin)
Readxml = gauche (readxml, endormi)
finition de fin
FunctionSubstr (corps, début, fin)
start = instr (corps, démarrage)
Substr = mid (corps, start + len (start) +1)
fins = instr (substr, fin)
Substr = Left (substr, end-1)
finition de fin
DIMGETCONT, CONTENT DE NOUVEAU
dimurl, titre
url = "http: //www.***.com" ''
getCont = readxml (URL, "gb2312", "<tableclass = k2border =" "0" "", "</s table>")
getCont = regexhtml (getCont)
Dimkeyid, classe d'information, ville, position, type de maison, niveau, zone, prix, démostra
DimContactman, contact
fori = 2Toubund (getCont)
réponse.Write (getCont (i) & "__ <br>")
TempLink = mid (getCont (i), instr (getCont (i), "href =" "") + 6, instr (getCont (i), "" "
onclick ") - 10)
TempLink = remplacer (TempLink, "../", "")
Response.Write (I & ":" & Templink & "<br>")