Getting Binary Data It's extremely simple to return binary data using the XMLHTTP object, the syntax is exactly the same, but you return the respondsBody property, which is an array of unsigned bytes: <% Response.Buffer = True Dim objXMLHTTP, xml Set xml = Server.CreateObject("Microsoft.XMLHTTP")
It's extremely simple to return binary data using the XMLHTTP object, the syntax is exactly the same, but you return the respondsBody property, which is an array of unsigned bytes: <%
Response.Buffer = True
Dim objXMLHTTP, xml
Set xml = Server.CreateObject("Microsoft.XMLHTTP")
xml.Open "GET", "http://www.4guysfromrolla.com/webtech/code/mitchell-pres.zip", False xml.Send
' Add a header to give it a file name:
Response.AddHeader "Content-Disposition", "attachment;filename=mitchell-pres.zip"
' Specify the content type to tell the browser what to do:
Response.ContentType = "application/zip"
' Binarywrite the bytes to the browser
Response.BinaryWrite xml.responseBody Set xml = Nothing
%>