TsunamiHype
Programmer
scenario is this...a customer #1 uploads a file to a directory they create via a unique codeword. The codeword becomes a directory and all files they upload are stored here.
Customer #2 logs into a download page and enters customer #1's codeword. he is then directed to the specific folder and can grab the files. Upon completion, click "confirm" to notify customer #1 that the files have been downloaded (via email)
easy nuff really, but...
Now, at this time I need to open tmp/[$codeword] and delete all files & then rmdir with no knowledge of the file names or the directory name [$codeword]. Keeping in mind that there may be multiple users saving in /tmp at any given time
i hope this isn't too vague... but to save space I won't include existing scripts unless neccessary.
I was going along the lines of :
$path = "/var/
// Open the folder
$dir_handle = @opendir($path) or die("<center><font color=#FF0000><font size=4>please check your codeword");
foreach (glob("*.wmf") as $file) {
echo "$filename size " . filesize($file) . "\n";
unlink($file);
}
--------timeline--------
//upload.htm - input form to gain $codeword
//upload.php - mkdir tmp/[$codeword] stores files here
//confirm.php - confirms file upload and size (need to have $unlink script here)
2 issues: 1.
$codeword is posted to upload.php from upload.htm and I am trying to do this without cookie usage.
2. (glob("*.wmf") assumes its a wmf... hell it could be an itunes file for all i know
any ideas of course are greatly needed....
Customer #2 logs into a download page and enters customer #1's codeword. he is then directed to the specific folder and can grab the files. Upon completion, click "confirm" to notify customer #1 that the files have been downloaded (via email)
easy nuff really, but...
Now, at this time I need to open tmp/[$codeword] and delete all files & then rmdir with no knowledge of the file names or the directory name [$codeword]. Keeping in mind that there may be multiple users saving in /tmp at any given time
i hope this isn't too vague... but to save space I won't include existing scripts unless neccessary.
I was going along the lines of :
$path = "/var/
// Open the folder
$dir_handle = @opendir($path) or die("<center><font color=#FF0000><font size=4>please check your codeword");
foreach (glob("*.wmf") as $file) {
echo "$filename size " . filesize($file) . "\n";
unlink($file);
}
--------timeline--------
//upload.htm - input form to gain $codeword
//upload.php - mkdir tmp/[$codeword] stores files here
//confirm.php - confirms file upload and size (need to have $unlink script here)
2 issues: 1.
$codeword is posted to upload.php from upload.htm and I am trying to do this without cookie usage.
2. (glob("*.wmf") assumes its a wmf... hell it could be an itunes file for all i know
any ideas of course are greatly needed....