Simple PHP script to delete all ZIP files in a subdirectory 24 hrs old or older



I have a website on a shared Apache server running PHP 5.2.17. There is a subdirectory named zip in the root folder of the website. The website generates downloads, on the fly, of multiple files packed in ZIP files for end users to then download. Trouble is these massive ZIP files never get deleted after they have served their purpose. They range in size for 5 mg to 500 mg each. On any given day there may be 25 legacy zip files stored in that subdirectory.

I need you to write a simple PHP script that, when called, will mass delete all the files in that sub that are > than 24 hours, or one day old. I don't want a mass kill of all files because someone may be in the middle of a download when the script is called.

Believe me, there are plenty of "free" PHP scripts that purport to do this exact same thing. All I have to is modify the script to point to the zip folder and invoke it. NONE of them work, so I don't want some old script YOU found on the internet that I already know doesn't work. This should be an easy task for an experienced PHP developer and I won't pay a lot for such a simple script. My main concern is how I test the script to make sure it works before I release funds. Maybe through a milestone payment. If it doesn't work on my hosted generic, shared Apache server, you don't get paid... :-)

I intend to invoke the script via a CRON job once a day via the Cpanel cron job setup. I am easy to wotk with but I need all the code WELL commented so I can follow your logic, but mainly it has to work as describe above.

Skills: PHP

See more: when you don t get the job, test for php developer, sub all, simple free php code, php developer mg, php developer free job, php developer download free, i can write want to get paid, how to write a code in php, how to get to a size 0, how to get a job on the internet, how to get a developer job, get paid to write code, get paid to code, get a free website developer, get a developer job, easy php developer, download php 5.3, all sub, i can t get a job, php developer server, middle php developer, write a simple php script, root folder, milestone or

Project ID: #4836792

Awarded to:


i can give you the script

$20 USD in 0 days
(30 Reviews)

4 freelancers are bidding on average $44 for this job


nice to help yoiu

$105 USD in 3 days
(259 Reviews)

Hello, will deliver with in an hour.

$20 USD in 1 day
(15 Reviews)

Hi, I am a PHP developer and I perform tasks with zip files almost every day.

$30 USD in 1 day
(0 Reviews)