I would like to get the last modified date of a remote file by means of curl. Does anyone know how to do that?
Had to solve similiar issue, but for me download once a day was enough so I compared just the modify day of the local (downloaded) cache file. The remote file had no Last-Modified header.
$xml = 'test.xml';
if (is_file($xml) || date('d', filemtime($xml)) != date('d')) {
$xml = file_get_contents(REMOTE_URL);
}