Last active
February 13, 2025 11:32
-
-
Save zoxon/10368362 to your computer and use it in GitHub Desktop.
PHP: Get file size by URL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function filesizeUrl($url) { | |
return ($data = @file_get_contents( $url )) ? strlen( $data ) : false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Load full file just to get it's size? NO NO NO