Salinan kode adalah sebagai berikut:
<%@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>
<head>
<title> untitledDocument </iteme>
<metahttp-equiv = "konten-tipe" content = "text/html; charset = gb2312">
<metahttp-equiv = "refresh" konten = "300; url = steal_house.asp">
</head>
<body>
<%
OnerrorresumeNext
'
Server.ScriptTimeout = 999999
'=================================================================================================
'Fungsi pengkodean karakter
'=========================================================================
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 = kode
BytestoBstr = objstream.readtext
objstream.close
setobjstream = tidak ada
Fungsi endfungsi
'Ambil posisi kejadian string garis di string lain
FunctionNewString (WSTR, STRNG)
Newsstring = instr (lcase (wstr), lcase (strng))
IfNewString <= 0ThennewString = len (WSTR)
Fungsi endfungsi
'Ganti fungsi string
FunctionReplacestr (Ori, STR1, STR2)
Replacestr = ganti (ori, str1, str2)
fungsi endfungsi
'=========================================================================
functionReadxml (url, kode, start, end)
setoSend = createObject ("microsoft.xmlhttp")
Sourcecode = osend.open ("get", url, false)
osend.send ()
Readxml = bytestoBstr (osend.responseBody, kode)
start = instr (readxml, start)
Readxml = mid (readxml, start)
ujung = instr (readxml, berakhir)
Readxml = kiri (readxml, end-1)
fungsi endfungsi
functionsubstr (body, start, end)
start = instr (body, start)
Substr = mid (body, start+len (start) +1)
ujung = instr (substr, end)
Substr = kiri (substr, ujung-1)
fungsi endfungsi
DimGetCont, NewsContent
Dimurl, judul
url = "http: //www.***.com" '' ''
getCont = readxml (url, "gb2312", "<tableClass = k2border =" "0" "", "</able>")
getCont = regexhtml (getCont)
Dimkeyid, Kelas Berita, Kota, Posisi, Tipe Rumahan, Level, Area, Harga, Demostra
Dimcontactman, kontak
fori = 2toubund (getCont)
response.write (getCont (i) & "__ <br>")
Templink = mid (getCont (i), instr (getCont (i), "href =" "")+6, instr (getCont (i), "" "
OnClick ")-10)
Templink = ganti (Templink, "../", "")
response.write (i & ":" & Templink & "<br>")