How-to articles, tricks, and solutions about ZIP

.rar, .zip files MIME Type

In PHP, you can use the finfo_file function to determine the MIME type of a file.

Unzipping files in Python

Here is a code snippet that demonstrates how to unzip a file using the zipfile module in Python:

ZIP all files in directory and download generated .zip

Here is an example of how you can use PHP to create a ZIP archive of all files in a directory and then prompt the user to download the generated ZIP file: