How do I generate a download page for users to click on a link or download button.
This is my remote upload script:
<form method="post">
<input name="url" size="50" />
<input name="submit" type="submit" />
</form>
<?php
set_time_limit (24 * 60 * 60);
if (!isset($_POST['submit'])) die();
$destination_folder = 'files/';
$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);
}
?>
</center>