Well first off I'm an absolute PHP novice but have managed to combine numerous php snippets and free scripts/plugins to create my own sort of cms. Im having a problem with the dUnzip class. I have made my script so a user can fill out a form, upload a zip which is then extracted autmatically to the server.
For security reason I need to check the files in the archive zip before extracting. If there are php files, exe or other file extensions which are not safe the zip is not extracted. I was told by the creator of the dUnzip class to use:
This displays the array of each file in the zip. My problem is how do I manage to explode the array, select file_name then use ereg to find disallowed file extension? I'm not sure if thats the right thing to do anyways but I can't think how to do it regardless.