Is there a way to get the size of a remote file http://my_url/my_file.txt without downloading the file?
Php function get_headers() works for me to check the content-length as
get_headers()
$headers = get_headers('http://example.com/image.jpg', 1); $filesize = $headers['Content-Length'];
For More Detail : PHP Function get_headers()