is there a way to zip or compress a file within a folder using php ?
i need since i want to allowed my user to upload files to my site.
and how to access the file inside the zip files ?
thanks,
Yes, there is a way you can access the files in a ZIP file. You can the ZIP file functions in the PHP extension php_zip. I don't know if Frihost has this extension enabled or not, but more information can be found here: http://www.php.net/zip. However, I do not like these functions very much. Perhaps a better one can be found here.
Here is a nice utility. Can create/extract tar/gzip/bzip2/zip archives.
i hear that there is a compresser that can compress until 98%, like 500 Mega to 5 Mega, but it need more than a day for compressing anda decompressing, i wonder is there a compresser like that ? if not what good compressor on php ?
thanks,
| Philip wrote: |
i hear that there is a compresser that can compress until 98%, like 500 Mega to 5 Mega, but it need more than a day for compressing anda decompressing, i wonder is there a compresser like that ? if not what good compressor on php ?
thanks, |
I don't think that is true. All the compressions depend on mathematical algorithms to represent a bigger set as a smaller set from which you could derive the bigger set unambiguously. There will be a limit after which this compression will have no effect.
i see, i get it
thanks for the info
er.. what the main reason that make a file when download can be resume able and multiple download ??
File download can be resumable/multidownloaded when your webserver allows files to be requested from arbitrary position. Eg., if it allows you to specify that a file download should start from 100th byte.
sorry but i little dumb on this.
then how can if i make a user download a file from download.php
that download.php read file and give 100 byte every loop until a file finished download, can this way make it resume able and multidownload able ? or it need a setup from webserver or what ?
If you have your own script to download file, you will not be able to provide resume and multidownload support for the downloads. If your webserver supports it and your file is directly under webserver doc root, user will be able to use these features.
oh.. i see, thanks..
so i need only to create a file to a user download,
and after a time i delete this file, right ?
thanks