Using the XMLHTTP object to get remote data, then use binary to output to the client browser, let the client download data, this example gets a compressed package from a remote server, and outputs it to the browser to provide the customer download.
Program code: <% ------------------------------------------- ------------------------------ Ouyang Dongjie creation (please keep this information) www.cnsxml.comqq: 2596812 MSN: XzskyWeb@hotmail.com Welcome to http://www.cnsxml.com/ Get more XML information --------------------------- -----------------------------------------------
Response.buffer = true Dim objxmlhttp, XML set XML = Server.createObject ("Microsoft.xmlhttp") 'creates an object XML.Open "get", "http://www.4guysfromrolla.com/webtech/code/mitchell-pres .zip ", false '" set object, specific XMLHTTP details see: http://www.cnsxml.com/blogview.asp? logid = 273 "XMLHTTP object and its method" One article XML.send' Send request Response .Addic-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%>