Check if remote file exists and when it was last updated.
string $url: URL of remote file.
array $headers: HTTP request headers.
stdClass Result object containing the HTTP request headers, response code, headers, data, redirect status and updated timestamp.
function locale_translation_http_check($url, $headers = array()) {
$result = drupal_http_request($url, array(
'headers' => $headers,
'method' => 'HEAD',
));
if ($result && $result->code == '200') {
$result->updated = isset($result->headers['last-modified']) ? strtotime($result->headers['last-modified']) : 0;
}
return $result;
}