Dynadot — .com Registration $8.99

Creating a zip from a hosting account.

Spacemail by SpaceshipSpacemail by Spaceship
Watch

Alex.

Account Closed
Impact
5
i need to know if i can create a zip automaticaly online, so the code will grab a load of files from a directory and create a .zip file, which it would prefferibly store till the next time the script is run.
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
AfternicAfternic
Check out this page:
http://uk2.php.net/zip

Contains a lot of information, pretty much everything you will need. I don't know much about the zip libraries or functions myself so that's as far as i can help advice wise without researching it further :)

Matt
 
Last edited:
0
•••
thanks for the info!
 
0
•••
I would personally use tar, etc. on a shell_exec() level, with a set filename, then serve that

Example:
Code:
shell_exec("tar c newfile.tar *");
header("Location: /path/to/newfile.tar");
 
0
•••
thanks, but I asked for Zip because by defualt, every windows pc can extract a zip file, whereas you need a program to unzip tar :(

thanks for your suggestion though :)
 
0
•••
Windows XP, unless Vista can (I just uninstalled it...BLOATWARE...so I can't tell) is the only OS that can, by default, parse ZIP files.

On some *NIX systems, you can do this:

Code:
shell_exec("zip newfile.zip *");
header("Location: /path/to/newfile.zip");
 
0
•••
Appraise.net

We're social

Unstoppable Domains
Domain Recover
DomainEasy — Zero Commission
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back