Help - Search - Members - Calendar
Full Version: Delete File After Certain Amount Of Time
Zymic Webmaster Forums > Web Design & Development > Server Side Scripting > PHP
ultimategamer50
Hello all.
I have made a file hosting site and I don't want the uploaded files to just sit there and waste all my space so does anyone have a php script to delete files 24 hours after upload? I tried google and nothing came up.
Braunson
Look into cron jobs.. I dont think you can use them on the Zymic servers though.. A cron job is basically where you tell the system on x days x hours x minutes to run this .php script or whatever else. And in the .php script you would have it search the database of uploaded files with upload dates, and delete any files where todays date is x days old from the upload date of each file and have it delete it.. If that makes any sense.
ultimategamer50
QUOTE(Braunson @ Jul 5 2009, 05:01 AM) *
Look into cron jobs.. I dont think you can use them on the Zymic servers though.. A cron job is basically where you tell the system on x days x hours x minutes to run this .php script or whatever else. And in the .php script you would have it search the database of uploaded files with upload dates, and delete any files where todays date is x days old from the upload date of each file and have it delete it.. If that makes any sense.

thanks for the reply! But do you know of anything just like that but works on zymic? I don't neccessarily NEED it cause I can do this manually but I was hoping if there was a easier way.
Ed
QUOTE(ultimategamer50 @ Jul 6 2009, 02:46 AM) *
thanks for the reply! But do you know of anything just like that but works on zymic? I don't neccessarily NEED it cause I can do this manually but I was hoping if there was a easier way.


Filehosting websites aren't allowed on Zymic.
ultimategamer50
QUOTE(Bread @ Jul 6 2009, 08:47 AM) *
Filehosting websites aren't allowed on Zymic.

They aren't!? blink.gif in the new hosting account it didn't say that, and I looked at the tos and I didn't find anything that said I couldn't huh.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.