php get remote file last modified

Solutions on MaxInterview for php get remote file last modified by the best coders in the world

showing results for - "php get remote file last modified"
Francesco
23 Sep 2017
1<?php
2// outputs e.g.  somefile.txt was last modified: December 29 2002 22:16:23.
3
4$filename = 'somefile.txt';
5if (file_exists($filename)) {
6    echo "$filename was last modified: " . date ("F d Y H:i:s.", filemtime($filename));
7}
8?>