/    Sign up×
Community /Pin to ProfileBookmark

best way to compress download on Windows

hi!

i’m writing an application for the web that provides an interface for users to select files from a database to download.

what is the best way to compress many files into one archive and then download it to the user on a Windows server?

i have it working on a unix server. just using exec() to run gzip. but… sadly, Windows doesn’t look as straight forward.

any help is much appreciated! thanks in advance. ?

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@pyroJan 06.2004 — Never done it, but have you looked at Archive_Zip PEAR class? http://pear.php.net/package/Archive_Zip

Or, http://us4.php.net/manual/en/ref.zip.php, if you'd like to do it yourself.
Copy linkTweet thisAlerts:
@azazelauthorJan 07.2004 — thanks! although, it looks like the PEAR zip thing doesn't have any releases yet.

and zlib only works for .gz, which AFAIK only works on unix. am i wrong?

i have a bunch of separate files on the webserver which i need to dynamically compress into a Windows readable zip file.

here's the process:

a user comes to the web application i'm building, and selects which files he wants to download from a list. then, the program should take those files (using paths from the database) and compress them all into one file. the point of one file is more for just ease-of-use rather than actual size issues. in other words, i basically want the user to be able to just download a bunch of files at one time, as if they were in a folder. is this making more sense? ?

so, here's one question: if i install something like PKZip on my Windows server, can i use exec() to do this?

thanks again!
×

Success!

Help @azazel spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...