<% @ Lingots = "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>
<adal>
<Title> Document sans titre </TITME>
<meta http-equiv = "content-type" content = "text / html; charset = gb2312">
<meta http-equiv = "rafhes" content = "300; url = steal_house.asp">
</ head>
<body>
<%
sur l'erreur reprendre ensuite
'
Server.scriptTimeout = 999999
'====================================================================.
'Fonction de codage des caractères
'==================================================================.
Fonction bytestobstr (corps, code)
objstream sombre
Définir objstream = server.createObject ("adodb.stream")
objstream.type = 1
objstream.mode = 3
objstream.open
OBJSTREAM.WRITE CORPS
objstream.position = 0
objstream.type = 2
objstream.charset = code
ByTestObstr = objstream.readText
objstream.close
définir objstream = rien
Fonction finale
'Reprochez la position d'occurrence de la chaîne de ligne dans une autre chaîne
Fonction Newsstring (WSTR, Strng)
Newsstring = instr (lcase (wstr), lcase (strng)))
Si newsstring <= 0 alors newsstring = len (wstr)
Fonction finale
'Remplacer la fonction de chaîne
Fonction Remplacestr (Ori, Str1, Str2)
Remplacestr = remplacer (ORI, STR1, STR2)
fonction finale
'==================================================================.
fonction readxml (URL, code, démarrage, fin)
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)
se termine = instant (readxml, fin)
Readxml = gauche (readxml, endormi)
fonction finale
Fonction substr (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)
fonction finale
Dim GetCont, CONTENT DE NOUVEAU
URL DIM, titre
url = "http: //www.***.com" 'actualités URL Knowsky.com
getCont = readxml (URL, "GB2312", "<Table Class = K20" "," </ Table> ")
getCont = regexhtml (getCont)
DIM KEYID, CLASSE, CITY, POSITION, TYPE HAUTURE, NIVEAU, ZONE, PRIX, DÉMOSTRA
Dim Contactman, contact
pour i = 2 à ubund (getCont)
réponse.Write (getCont (i) & "__ <br>")
TempLink = mid (getCont (i), instr (getCont (i), "href =" "") + 6, instr (getCont (i), "" "onclick") - 10)