XMLHTTP Download Remote Data Output to Browser Select from Oydj's Blog

xiaoxiao2021-03-06  41

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%>

Author Blog:

http://blog.9cbs.net/oydj/

related articles

Create WebService Flash Easy Calculator XMLHTTP with VS.NET Download Remote Data Output to Browser Let ASP.NET Output Graphics Use FSO to get BMP, JPG, PNG, GIF File Information No Components Upload Image to Database, the most complete solution

转载请注明原文地址:https://www.9cbs.com/read-52926.html

New Post(0)