danyexx
11-16-2010, 04:19 PM
1) Project Details: (be as specific as possible):
Ive been using a php download script to fetch http files directly to my server, the thing is in one of my servers downloads are getting broken at around 450 mb, maybe an issue with php on that server as it works fine on another server, dont want to contact server guys for some reasons to check so I think adding resume broken download support to the script may help me get the download completed.
<form method="post">
<input name="url" size="50" />
<input name="submit" type="submit" />
</form>
<?php
// maximum execution time in seconds
set_time_limit (24 * 60 * 60);
if (!isset($_POST['submit'])) die();
// folder to save downloaded files to. must end with slash
$destination_folder = 'get/';
$url = $_POST['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);
}
?>
2) Payment Amount: Tell me your price
3) Payment method/ details (Paypal, check? Timeline?): Paypal
4) Additional Info (about project or potential bidders):
Ive been using a php download script to fetch http files directly to my server, the thing is in one of my servers downloads are getting broken at around 450 mb, maybe an issue with php on that server as it works fine on another server, dont want to contact server guys for some reasons to check so I think adding resume broken download support to the script may help me get the download completed.
<form method="post">
<input name="url" size="50" />
<input name="submit" type="submit" />
</form>
<?php
// maximum execution time in seconds
set_time_limit (24 * 60 * 60);
if (!isset($_POST['submit'])) die();
// folder to save downloaded files to. must end with slash
$destination_folder = 'get/';
$url = $_POST['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);
}
?>
2) Payment Amount: Tell me your price
3) Payment method/ details (Paypal, check? Timeline?): Paypal
4) Additional Info (about project or potential bidders):