DanM711
asked on
create a zip file on an asp page
I need to create an asp page that will return a zip file that I want to dynamically create, containing an image that I pull from a url and some other files that I will want to pull from the server.
something along the lines of:
<%
Response.ContentType = "application/zip"
Response.Buffer = TRUE
set zip server.createobject("some zip component")
zip.addfile("http://www.mydomain.com/myimage.gif")
zip.addfile("localtextfile .txt")
response.write(zip.output( ))
%>
Can anyone provide me with some example asp code and a suggestion for a component to use.
something along the lines of:
<%
Response.ContentType = "application/zip"
Response.Buffer = TRUE
set zip server.createobject("some zip component")
zip.addfile("http://www.mydomain.com/myimage.gif")
zip.addfile("localtextfile
response.write(zip.output(
%>
Can anyone provide me with some example asp code and a suggestion for a component to use.
Hello
You will have to use a thrid party command line based zip application to zip files using asp. as suggested above, you can use pkzip application for the purpose. But remember following before proceeding
1. You need to have sufficient permissions at your web server to host thrid party componenets
2. You should have write permissions in the folder where you are looking to store resulting zip file.
Ask me if any further details are needed.
You will have to use a thrid party command line based zip application to zip files using asp. as suggested above, you can use pkzip application for the purpose. But remember following before proceeding
1. You need to have sufficient permissions at your web server to host thrid party componenets
2. You should have write permissions in the folder where you are looking to store resulting zip file.
Ask me if any further details are needed.
ASKER
Thanks, but i'm looking for some example code that will return a zip file, not just create one. So when a user clicks on a link to my asp page it will come up with a open / save dialogue for the zip file straight away.
And i need a component that will allow me to add files into the zip file i'm creating by specifying urls and file paths.
And i need a component that will allow me to add files into the zip file i'm creating by specifying urls and file paths.
please answer my above 2 questions before i provide you a sample code.. without having server access, this logic wont work..
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
http://forums.aspfree.com/code-bank-54/creating-zip-files-using-classic-asp-66544.html