How to get the file size of a remotely stored image? (php)
问题 Let's say we have an image file, stored in a remote server (for example, let's take this image), how can we determine (in PHP code) it's file size? If the file was on server, we would have used filesize (see here), but this wouldn't work on a remote file (see here). The other alternative is to check for the "Content-Length", but I believe it wouldn't work for an image file (see here) I would like for a solution like the one given here (e.g, something like: <?php function get_remote_size($url)