Generating a filename with tempnam()
<?php $tempfilename = tempnam('/tmp','data-'); print "Temporary data will be stored in $tempfilename"; ?>