日期:2014-05-16 浏览次数:20904 次
Function BytesToBstr(strBody,CodeBase)
dim obj
set obj=Server.CreateObject("Adodb.Stream")
obj.Type=1
obj.Mode=3
obj.Open
obj.Write strBody
obj.Position=0
obj.Type=2
obj.Charset=CodeBase
BytesToBstr=obj.ReadText
obj.Close
set obj=nothing
End Function
Function GetHttpPage(URL)
Dim xmlHttp
Dim RetStr
Set xmlHttp=server.CreateObject("Msxml2.XMLHTTP")
xmlHttp.Open "GET",URL, False
xmlHttp.Send
If Err.Number <> 0 Then
Set xmlHttp=Nothing
PostHttpPage = false
Exit Function
End If
GetHttpPage=bytesToBSTR(xmlHttp.responseBody,"GB2312")
Set xmlHttp = nothing
End Function
html=GetHttpPage("http://shop.gqlcby.com/")
sstart="<div id=""bb1"">"
send="</table>"
istart=instr(html,sstart)+len(sstart)
iend=instr(istart,html,send)+len(send)
response.Write mid(html,istart,iend-istart)