Web Hosting Talk







View Full Version : Looking for some quick PHP work for $$


Ango
03-17-2005, 12:58 PM
Hello

I have a file uploading site. I have a system that is supposed to prune images. I can select 1 week, 2 week etc and then hit prune. At present each image gets a hit when it is viewed. Also at present when I select the pruning timescale it finds xxxx number of images to prune however it does not delete them - it seems to just delete their entries from the database

We have tried using a delete function in the prune but as we have say 7000 images in one prune it timesout and does not delete. I need the script slightly adapted so that it not only removes files from the database, but moves these files to another location (i.e. /deletefile/) where they can be manually deleted.

Can anyone do this? If you need more info please email me - akhilstyle@gmail.com

Thanks
Akhil

bentruyman
03-17-2005, 02:19 PM
You'll have much more luck if you post in this forum (http://www.webhostingtalk.com/forumdisplay.php?forumid=33).

Ango
03-17-2005, 02:39 PM
Thanks - will do ;)

mfonda
03-17-2005, 03:07 PM
I think this should help you out and save you a bit of time and money:

http://us3.php.net/manual/en/function.set-time-limit.php
http://us3.php.net/manual/en/function.exec.php - use "mv" command to move file
http://dev.mysql.com/doc/mysql/en/delete.html

I would also recommend only doing a certain amount of files at a time, will be easier on your server, and less chance of timeout/error.