<?php
file1 = "image.jpg";
$startdate = mktime(0,0,0,12,17,2003); //mktime(hour, minute, second, month, day, year)
$datetoday = mktime(date("h, i, s, m, d, Y"));//todays date
$datediff = $datetoday - $startdate;
$numdays = round($dateDiff/60/60/24, 2);
$equalday = '$numdays == 7';
unlink '$file1';
echo 'There is about ' . $numdays . ' days left to download.<br />';
echo "Files has removed!";
?>
This scripts will set a time when it will delete the file.
For example, when it's about 7 days, it will delete the file "$file1", could any one re-write this PHP to makes it works?
It's like a weekly pictures, by the 7 days it will delete it self and said "times is up"