Last active
May 25, 2020 00:09
-
-
Save kicktv/ed7022f273e24bf6037fdb4853ade23d to your computer and use it in GitHub Desktop.
php get remote file size
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
<?php | |
//php get remote file size | |
$url = "http://www.html-editor.tk/videos/sintel.mp4"; | |
$head = array_change_key_case(get_headers($url, TRUE)); | |
$size = $head['content-length']; | |
echo $size; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment