prsupriya
asked on
ZIP one or more mp3 files using PHP
Hi!,
I need to zip one or more mp3 files using PHP. Can anybody help me to do this?
Thanks in advance,
S:
I need to zip one or more mp3 files using PHP. Can anybody help me to do this?
Thanks in advance,
S:
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I am sorry, i have the syntax for the zip program wrong....use the following instead:
exec('$zipPath outoutFile zipFile1 zipFile2 zipFile3');
I put a "-b " in there when i shouldn't have.
I hope this helps
exec('$zipPath outoutFile zipFile1 zipFile2 zipFile3');
I put a "-b " in there when i shouldn't have.
I hope this helps
Just to expand on what's been said, the PHP docs have info on this: http://us2.php.net/zip
And I believe I used this in the past with some success: http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=957&lngWId=8
And I believe I used this in the past with some success: http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=957&lngWId=8
ASKER
Hi! jasco4617,
Thanks for you response.
I used option as -j inorder not to create any subfolders if the zipfile location is given as relative path
exec('$zipPath -j outoutFile zipFile1 zipFile2 zipFile3');
Thanks,
S:
Thanks for you response.
I used option as -j inorder not to create any subfolders if the zipfile location is given as relative path
exec('$zipPath -j outoutFile zipFile1 zipFile2 zipFile3');
Thanks,
S:
Try these:
http://www.phpclasses.org/browse/package/945.html
http://sourceforge.net/projects/phpziplib
http://www.phpconcept.net/pclzip/index.en.php
or use one of the system functions (system, exec, etc.) to run a zip utility from the command line.