|
|
Here I make a simple code. |
<?php
function fsize($path) {
$fp = fopen($path,"r");
$inf = stream_get_meta_data($fp);
fclose($fp);
foreach($inf["wrapper_data"] as $v) {
if (stristr($v, "content-length")) {
$v = explode(":", $v);
return trim($v[1]);
}
}
return 0;
}
?>
<?php
$file = "https://downloads.wordpress.org/plugin/wordpress-seo.22.6.zip";
$inbytes = fsize($filesize);
echo $inbytes;
?>
Category: | Web Tutorial |
Sub Category: | PHP URL/LINK Tutorial |
Uploaded by: | Admin |
Read Articlehttps://develop.horje.com/learn/1434/reference