Home > front end >  Asp to generate static local normal, database stuck to the server is running
Asp to generate static local normal, database stuck to the server is running

Time:04-19

The Function getHTTPPage (url)
Dim HTTP
=set HTTP Server. Createobject (" Microsoft. XMLHTTP ")
Http. Open the "post", url, false
Http. The send ()
If Http. Readystate <> 4 then
The exit function
End the if
GetHTTPPage=bytesToBSTR (Http responseBody, "GB2312")
Set the HTTP=nothing
If err. Number <> 0 then err. Clear
End the function
The Function BytesToBstr (body, Cset)
Dim objstream
The set objstream=Server. CreateObject (" adodb. Stream ")
Objstream. Type=1
Objstream. Mode=3
Objstream. Open
Objstream. Write the body
Objstream. Position=0
Objstream. Type=2
Objstream. Charset=Cset
BytesToBstr=objstream. ReadText
Objstream. Close
The set objstream=nothing
End Function
  •  Tags:  
  • ASP
  • Related