PHP tmpfile May 12, 2012 Pramod T P It creates a temporary file Example <?php $fp = tmpfile(); fwrite($fp, “phpccodez”); rewind($fp); echo fread($fp,1024); fclose($fp); ?> Output phpccodez