XMLHTTP download remote Data output to browser _xml/rss

Source: Internet
Author: User
Tags zip



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)


www.cnsxml.com


qq:2596812 msn:xzskyweb@hotmail.com


  ----------------------------------------------


(Source: Wind-flash Network College)

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.