xml| Browser | data | download
Use the XMLHTTP object to get the remote data, and then output the data to the client browser with binary, so that the customer downloads it, this example obtains a compressed package from a remote server and outputs it to the browser to provide the customer download.
Program code:
<%
Response.Buffer = True
Dim objXmlHttp, XML
Set XML = Server.CreateObject ("microsoft.xmlhttp") ' Create object
Xml. Open "Get", "Http://www.4guysfromrolla.com/webtech/code/mitchell-pres.zip", False ' Set object, specific XMLHTTP detailed use method see: http:// www.cnsxml.com/blogview.asp?logID=273 the article "XMLHTTP object and its method"
Xml. Send ' sends a request
Response.AddHeader "Content-disposition", "Attachment;filename=mitchell-pres.zip" ' Add header to this file
Response.ContentType = "Application/zip" Set Output type
Response.BinaryWrite xml.responsebody ' output binary to browser
Set xml = Nothing
%>
----------------------------------------------
Ouyangdongjie Creation (Reprint please keep this information)
Www.cnsxml.com
qq:2596812 msn:xzskyweb@hotmail.com
----------------------------------------------