The Little Guy Posted November 22, 2006 Share Posted November 22, 2006 Is it possible to scan through a zip file on upload, and retrieve all the files that are contained with in that zip file? I would like to save all contents of the zip file to a database, such as...files, folders, and sub files and sub folders.That way people who download the zip file will be able to tell what is inside the file before they download it. Link to comment https://forums.phpfreaks.com/topic/28144-scan-zip-file/ Share on other sites More sharing options...
The Little Guy Posted November 22, 2006 Author Share Posted November 22, 2006 I got it... and here is how I did it if anyone wants to know:zip must be enabled on your server.[code]<?php$zip = zip_open($_FILES['origial_file']['tmp_name']); if ($zip) { while ($zip_entry = zip_read($zip)) { echo "<b>Name:</b> " . zip_entry_name($zip_entry) . "\n<br>"; } zip_close($zip); }?>[/code] Link to comment https://forums.phpfreaks.com/topic/28144-scan-zip-file/#findComment-128739 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.