temporary upload
Moderator: General Moderators
-
chris12295
- Forum Contributor
- Posts: 113
- Joined: Sun Jun 09, 2002 10:28 pm
- Location: USA
- Contact:
temporary upload
i am using uniqid() to make a random file name and copy() to place it in a /tmp directory, its an image file, and i want the file to automatically unlink after 5 minutes, is this possible?
-
fractalvibes
- Forum Contributor
- Posts: 335
- Joined: Thu Sep 26, 2002 6:14 pm
- Location: Waco, Texas
-
chris12295
- Forum Contributor
- Posts: 113
- Joined: Sun Jun 09, 2002 10:28 pm
- Location: USA
- Contact:
i have a script that eventually will insert data into a database if a crediat card is succesfully processed. however, the user needs to know his/her information was correct before they pay so i temporarily display all their info inluding pictures. the pictures are not stored in their permanent locations unless the credit card is processed so i need the "PREVIEW" pics to be temporary and delete themselves after 5 minutes to avoid thousands of temporary pics accumulating in my tmp directory.
process:
1. user enters info and selects pics to upload
2. data goes to validation script which shows a confirmation of purchase (inluding all info and a preview of their selected pic which has been copied to the tmp directory)
3. user accepts and form goes to credit card processor (tmp pics deleted after 5 mins)
4. credit card is accepted then data is inserted and pics are permanently copied to user directory.
process:
1. user enters info and selects pics to upload
2. data goes to validation script which shows a confirmation of purchase (inluding all info and a preview of their selected pic which has been copied to the tmp directory)
3. user accepts and form goes to credit card processor (tmp pics deleted after 5 mins)
4. credit card is accepted then data is inserted and pics are permanently copied to user directory.
if you write your own session handler you may delete temp. data whenever a session is going to be destroyed
http://www.php.net/manual/en/function.s ... andler.php
http://www.php.net/manual/en/function.s ... andler.php
-
chris12295
- Forum Contributor
- Posts: 113
- Joined: Sun Jun 09, 2002 10:28 pm
- Location: USA
- Contact: