title: Check if remote file has changed
body: <p>I'm using PHP cURL module to extract timestamp of a remote file via HTTP headers. I've managed to grab modification timestamp by using <code>CURLOPT_FILETIME</code> constant. Of course, I'm doing this in order too see if the remote file has changed without downloading it's contents.</p>
  
  <pre><code>$ch = curl_init($url);  /* create URL handler */
  curl_setopt($ch, CURLOPT_NOBODY, TRUE); /* don't retrieve body contents */
  curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE); /* follow redirects */
  curl_setopt($ch, CURLOPT_HEADER, FALSE); /* retrieve last modification time */
  curl_setopt($ch, CURLOPT_FILETIME, TRUE); /* get timestamp */
  $res = curl_exec($ch);
  $timestamp = curl_getinfo($ch, CURLINFO_FILETIME);
  curl_close($ch);
  </code></pre>
  
  <p>What is, in your opinion the best way to check if remote file has changed? Should I go with timestamp check only? Or are there some other clever options that didn't came to my mind?!</p>