uses the XMLHTTP object to obtain remote data and then outputs it to the client browser with binary output to allow the customer to download the data, which obtains a compressed package from a remote server and outputs it to the browser to provide a 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 "XMLHTTP objects and their methods" in the text of XML. Send ' sends request
Response.AddHeader "Content-disposition", "attachment;filename=mitchell-pres.zip" Add headers 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)
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.