I have runned a test, and it stops at 252,9mb...
Here you have the code:
PHP Code:
<?php
// ARCHIVO
$f = $_GET["f"];
// PESO
function urlfilesize($url,$thereturn) {
if (substr($url,0,4)=='http') {
$x = array_change_key_case(get_headers($url, 1),CASE_LOWER);
$x = $x['content-length'];
}
else { $x = @filesize($url); }
if (!$thereturn) { return $x ; }
elseif($thereturn == 'mb') { return round($x,2) ; }
elseif($thereturn == 'kb') { return round($x,2) ; }
}
// Tengo PESO
$peso = urlfilesize($_GET[f],'');
// Headers
$name = explode("/", $f);
$nc = count($name);
$nombre = $name[$nc-1];
header("Content-Description: File Transfer");
header("Content-type: application/octet-stream");
header("Content-Disposition: attachment; filename=\"$nombre\"\n");
header("Content-Length: ".$peso);
header("Cache-Control: no-store, no-cache, must-revalidate");
// Imprimir
$fp=fopen("$f", "r");
while(!feof($fp)) {
echo fread( $fp, $peso);
stream_set_timeout($fp, 99999);
set_time_limit(99999);
ob_flush();
flush();
}
fclose( $fp );
?>
Is there a limitation in cpanel?