I have to download large size file > xxx MB/GB using PHP code. How can i download this? I ve wrote this code but I can't download biggest < 45 mb. But I need download lass then 1 GB..
<?php
##Simple download file for URL's##
if(isset($_POST['download'],$_POST['downloadurl'])) {
$downloadurl = htmlspecialchars($_POST['downloadurl']);
if(!empty($downloadurl)) {
if (@fopen($downloadurl, "r")) {
$file = basename($downloadurl);
if(copy($downloadurl, $file)) {
echo "Fayl serverga ko'chirildi! <br />";
echo '<textarea>'.$_SERVER['HTTP_HOST'].'/'.$file.'</textarea>';
} else {
echo "We're sorry we can't download this file!";
}
} else {
echo "This url is empty or not file!";
}
} else {
echo "Please enter url filei!";
}
exit();
}
echo '<form action="download.php" method="post">
URL FILE: <br /><input type="text" name="downloadurl" ><br />
<input type="submit" name="download" value="submit">';