As you can see here http://php.net/manual/en/function.filesize.php :
As of PHP 5.0.0, this function can also be used with some URL wrappers. Refer to Supported Protocols and Wrappers to determine which wrappers support stat() family of functionality.
and if you will go to this link http://www.php.net/manual/en/wrappers.http.php , you will see that Supports stat() is "NO". So you can't use http links with filesize
function. If this is local file just use absolute or relevant path of the file like '/path/to/my/file'
, if this is remote file (not sure but) I think it should be downloaded first with curl
and curl_getinfo
function to read Content-Length http property