first thing is that you need to remember that there is no relay good way in php to read the date-info of a remote file on a different server, so you can also compare date-infos of local files.
you can use
filemtime('string filename');
to get the time the file has been changed