Reputation: 10104
If I use PHP's get_headers()
to return the Content-Length of an image file, why does this not match the size of the file if I save it to disk (OSX)?
protected function checkRemoteFile($url)
{
$headers = get_headers($url,1);
$size = $headers['Content-Length'];
return $size;
}
Upvotes: 1
Views: 438
Reputation: 42065
Likely because the content was sent using Content-Encoding: gzip.
Upvotes: 4