Praticamente crea questi file sempre con nomi diversi ma il problema è che poi come risalgo al nome del file?
Codice PHP:
Function NomeCasuale(){
$N_Caratteri = 15;
$Stringa = "";
For($I=0;$I<$N_Caratteri;$I++){
do{
$N = Ceil(rand(48,122));
}while(!((($N >= 48) && ($N <= 57)) || (($N >= 65) && ($N <= 90)) || (($N >= 97) && ($N <= 122))));
$Stringa = $Stringa.Chr ($N);
}
return $Stringa;
}
$nome_file = NomeCasuale(); //Cambia sempre
$txt= ".txt"; //estensione
$nome=$_POST["nome"];
$contenuto=$_POST["testo"];
$file_name="$nome_file$txt";//nome che cambia sempre
$complete_path=$file_name;
$var=fopen($complete_path,"x+");
$fp = fopen($complete_path,"x+");
fwrite($var,""."".$contenuto."");
fclose($fp);