<%@言語= "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>
<head>
<title>無題のドキュメント</title>
<meta http-equiv = "content-type" content = "text/html; charset = gb2312">
<Meta http-equiv = "reffery" content = "300; url = steal_house.asp">
</head>
<body>
<%
エラーの再開時に次に再開します
'
server.scripttimeout = 999999
'===========================================================================================================
'文字エンコード関数
'==================================================================================
関数bytestobstr(body、code)
DIM OBJSTREAM
objstream = server.createObject( "adodb.stream")を設定します
objstream.type = 1
objstream.mode = 3
objstream.open
objstream.write body
objstream.position = 0
objstream.type = 2
objstream.charset = code
bytestobstr = objstream.readtext
objstream.close
objstream = Nothingを設定します
エンド関数
「別の文字列にライン文字列の発生位置を取得します
機能新聞(WSTR、STRNG)
新聞= string(lcase(wstr)、lcase(strng))
新聞<= 0の場合、新聞= len(WSTR)
エンド関数
'文字列関数を交換します
function appleclyestr(ori、str1、str2)
交換型=交換(ori、str1、str2)
エンド関数
'==================================================================================
関数readxml(url、code、start、end)
set osend = createObject( "microsoft.xmlhttp")
sourcecode = osend.open( "get"、url、false)
osend.send()
readxml = bytestobstr(osend.responsebody、code)
start = struns(readxml、start)
readxml = mid(readxml、start)
end = strust(readxml、end)
readxml = left(readxml、end-1)
エンド関数
関数subst(body、start、end)
start = strunt(body、start)
substr = mid(body、start+len(start)+1)
end = strust(substr、end)
substr = left(substr、end-1)
エンド関数
Dim GetCont、NewsContent
Dim URL、タイトル
url = "http://www.***.com" 'news urlknownky.com
getCont = readxml(url、 "gb2312"、 "<table class = k20"、 "</table>")
getCont = regexhtml(getCont)
Dim KeyID、Newsclass、City、Position、HouseType、Level、Area、Price、Demostra
薄暗いコンタクトマン、連絡先
i = 2からUbund(getCont)へ
respons.write(getCont(i)& "__ <br>")
templink = mid(getCont(i)、grutcont(i)、 "href =" "")+6、strust(getCont(i)、 "" "onclick")-10)