I have a script that checks a zipfile containing a number of matching PDF+textfiles. I want to unpack, or somehow read the textfiles from the zipfile, and just pick out some information from the textfile to see that the file version is correct.
I was looking at the tempnam()
function to find an equivalent to make a tempdir, but maybe someone has a better solution for the problem.
The indexfile looks something like this. (->
is for TAB char).
I have made the function to extract the version from the textfile and to check if its correct already, its only the unpacking, tmpdir or some other solution im looking for.
1000->filename->file version->program version->customer no->company no->distribution
2000->pagenumber->more info->more info->...
Another possibility is to use the temporal file as a kind of semaphore to guarantee the unicity of the directory name. Then, create a directory whose name is based on the file name.