Function Gethttppage (Httpurl)
If IsNull (httpurl) =true Or httpurl= "$False $" Then
Gethttppage= "$False $"
Exit Function
End If
Dim Http
Set http=server.createobject ("MSXML2. XMLHTTP ")
Http.open "Get", Httpurl,false
Http.send ()
If Http.readystate<>4 Then
Set http=nothing
Gethttppage= "$False $"
Exit function
End If
Gethttppage=bytestobstr (Http.responsebody, "GB2312")
Set http=nothing
If Err.number<>0 Then
Err.Clear
End If
End Function
Function Bytestobstr (Body,cset)
Dim objstream
Set objstream = Server.CreateObject ("ADODB.stream")
Objstream. Type = 1
Objstream. Mode =3
Objstream. Open
Objstream. Write body
Objstream. Position = 0
Objstream. Type = 2
Objstream. Charset = Cset
Bytestobstr = objstream. ReadText
Objstream. Close
Set objstream = Nothing
End Function
Function GetBody (Constr,startstr,overstr,inclul,inclur)
If constr= "$False $" or constr= "" or IsNull (constr) =true or startstr= "" or IsNull (STARTSTR) =true or overstr= "" or IsNull (Ov ERSTR) =true Then
Getbody= "$False $"
Exit Function
End If
Dim constrtemp
Dim Start,over
Constrtemp=lcase (CONSTR)
Startstr=lcase (STARTSTR)
Overstr=lcase (OVERSTR)
Start = InStrB (1, Constrtemp, Startstr, Vbbinarycompare)
If Start<=0 Then
Getbody= "$False $"
Exit Function
Else
If Inclul=false Then
Start=start+lenb (STARTSTR)
End If
End If
OVER=INSTRB (Start,constrtemp,overstr,vbbinarycompare)
If over<=0 Or Over<=start Then
Getbody= "$False $"
Exit Function
Else
If inclur=true Then
Over=over+lenb (OVERSTR)
End If
End If
GETBODY=MIDB (Constr,start,over-start)
End Function