Will this do what I think?
I want to download a new copy when the current file is 30+ days old.
if(file_exists('mytextfile.txt')) {
clearstatcache();
$ft = filemtime('mytextfile.txt');
$past = mktime(0, 0, 0, date("m"), date("d")-30,date("Y"));
if($ft<$past) {
@copy('http://www.website.com/mytextfile.txt', 'mytextfile.txt');
}
}