I have the stream of the binary data. I need to use some file
associated function with it. For example filesize(), imagesize() etc.
At the moment, I write this data stream into a tmp file
fopen('/tmp/tempfile', 'x+'), do the file functions, then unlink()
it. It surely is not an elegant way to do, let along a good
Is there a way to create a file in the memory from the data stream? or
even use file functions without first write the stream into a file? Please note, the data stream does not come from upload. So $_FILES does not help.
Failing that, what is the most sercure way to find out where is the default temp directory within php?