i have download link
how i can upload this file to my server with download link?
its better to upload it in my directory
i wana upload a 700 megabyte file to directory of my server!
i have download link
how i can upload this file to my server with download link?
its better to upload it in my directory
i wana upload a 700 megabyte file to directory of my server!
i wrote this code
<?php
$time_start = microtime(true);
ini_set('max_execution_time', 360);
echo "<br>" ;
//$file = file('web-graph.txt');
ini_set('memory_limit', '2048M');
// folder to save downloaded files to. must end with slash
$destination_folder = 'files/';
$url = 'آدرس اینجا';
$newfname = $destination_folder . basename($url);
$file = fopen ($url, "rb");
if ($file) {
$newf = fopen ($newfname, "wb");
if ($newf)
while(!feof($file)) {
fwrite($newf, fread($file, 1024 * 8 ), 1024 * 8 );
}
}
if ($file) {
fclose($file);
}
if ($newf) {
fclose($newf);
}
$time_end = microtime(true);
$time = $time_end - $time_start;
echo "مدت زمان پردازش به ثانیه: {$time}";
echo "<br>";
?>
but i need the code to do it faster
more faster
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.