I'm having a bit of difficulty understanding how the zip function work, zip_open, zip_entry_read, etc.
Want I want to do is be able to upload a collection of zipped jpeg/gifs and have my site open the zip file, pass each file into getimagesize so that it can be determined to be a valid image type, then into php image functions to be resized, etc.
Does anyone have an example of how to grab a file from within a zip file, and pass it into something else? Something like this:
$ZipFile = zip_open ($HTTP_POST_FILES['File']['tmp_name']);
if ($ZipFile)
{
while ($ZipEntry = zip_read ($ZipFile))
{
zip_entry_open($ZipFile, $ZipEntry, "r");
$PhotoSizeType = getimagesize(zip_entry_read($ZipEntry, zip_entry_filesize($ZipEntry))); // PhotoSizeType is an array, 0 = width, 1 = height, 2 = image type
echo $PhotoSizeType[2]."*<br>";
}
}