I create a temp file by php the code is :
$filename = tempnam('/tmp', 'cre');
$fp = fopen($filename, 'w');
fwrite($fp, 'store temporary data in a file');
fclose($fp);
unlink($filename);
and include this file by :
$temp_file = tempnam(sys_get_temp_dir(), '');
echo $temp_file;
Now how can I write a rendom number on it for every user? And can I call this file from another page ? Like: a user come my site now it generated with a number code, I say user to go code.php
with new tab here i call the tamp file by
$temp_file = tempnam(sys_get_temp_dir(), '');
echo $temp_file;
is it possible ?