Hey all, Well im a real noob but have been spending some time on this now.
I input the url to the file i want to store on my server from another server but it doesen't work.
It consists of two files.
Index.php and copy.php
Index.php :
<p align="center"><font size="6">Remote File Copy Script</font><font size="5"><br>
</font>Simply copy remote files to your sever.</p>
<p align="center"> </p>
<form method="GET" action="copy.php">
<p align="center"><font size="5">File:</font>
<input type="text" name="file" size="55" style="font-family: Tahoma; font-size: 12pt; border: 1px solid #FF9933; padding-left: 4px; padding-right: 4px; padding-top: 1px; padding-bottom: 1px" tabindex="1"><br>
<br>
<input type="submit" value="Submit" name="B1" style="font-family: Tahoma; font-size: 14pt; font-weight: bold; border: 1px solid #FF9933; padding-left: 4px; padding-right: 4px; padding-top: 1px; padding-bottom: 1px; background-color: #FFECD9" />
<br>
<br>
Ex: http://www.example.com/test.zip</p>
</form>
and copy.php
<?php
$file= $_GET['file'];
$path = "$file";
$newfile = basename($path);
echo "Done.";
if (!copy($file, $newfile)) {
echo "failed to copy $file...\n";
}
?>
Also if you could help on changing the default save directory to /files/ and maybe some sort of progress bar like counting up the kilobytes it has transfered. (Ive had this on my old script that didnt work, it only showed bytes and not kilobytes)
Thanks.