```
function Random_N() {
    $RandomNumber = mt_rand(1, 9999); 
    return 'temp_file/$RandomNumber.html';
}

global $file_name;
$file_name=Random_N();          

$file = fopen($file_name, 'w+');
$text=$msg1;
fwrite($file, $text);

$_SESSION['body']=$msg1;
$_SESSION['file_name1']=$file_name;

```