Upload from URL – Copy From URL – Transload – Script
Well, beacuse my upload speed is to slow i tried to find solution how to copy files from some url to my server, or another words from one server on internet to space on my server. I found this php script which works fine and i am going to copy some favorite mp3′s to my reseller host
Feel free to use this code (i cant credit it because i dont know who is owner and also think that someone who know php can easy write this):
note: this would be probably big security risk on your server.
in the first text box paste complete url of wished file and in second only name of file with extension. your file will be saved in script folder under chosen name…
Imageshack call this transload.
Here is the code.
<?php
if ($_GET[xfer]) {
if ($_POST[from] == "") {
print "You forgot to enter a url.";
} else {
copy("$_POST[from]", "$_POST[to]");
$size = round((filesize($_POST[to])/1000000), 3);
print "transfer complete.<br>
<a><a href=\"$_POST[from]\">$_POST[from]</a><br>
<a><a href=\"$_POST[to]\">$_POST[to]</a> : $size MB";
}
} else {
print "<form action=\"$PHP_SELF?xfer=true\" method=post>
from(http://): <input name=from><br>
to(filename): <input name=to><br>
<input type=submit value=\"transload\">";
}
?>
No related posts.
Comments
Leave a Reply



