function l10n_update_http_check in Localization update 6
Same name and namespace in other branches
- 7.2 l10n_update.http.inc \l10n_update_http_check()
- 7 l10n_update.inc \l10n_update_http_check()
Check if remote file exists and when it was last updated.
Parameters
$url: URL of remote file.
$headers: HTTP request headers.
Return value
object Result object containing the HTTP request headers, response code, headers, data, redirect status and updated timestamp. @see l10n_update_http_request()
1 call to l10n_update_http_check()
- l10n_update_source_check_download in ./
l10n_update.check.inc - Check remote file object.
File
- ./
l10n_update.inc, line 252
Code
function l10n_update_http_check($url, $headers = array()) {
$result = l10n_update_http_request($url, $headers, 'HEAD');
if ($result && $result->code == '200') {
$result->updated = isset($result->headers['Last-Modified']) ? strtotime($result->headers['Last-Modified']) : 0;
}
return $result;
}