Use PHP to remotely download files to the space. I just moved to the blog and planned to migrate the data in two spaces but encountered some problems, when the packaged file is too large, you can't think of PHP to remotely download the file, and then write a script to move the file to the blog just now. I plan to migrate the data in the two spaces, but I encountered some problems, when the packaged file is too large, you can't think of PHP to remotely download the file.
Then I wrote a script!
03 |
if ($_POST[from] == "") { |
04 |
print "You forgot to enter a url."; |
05 |
} else { |
06 |
copy("$_POST[from]", "$_POST[to]"); |
07 |
$size = round((filesize($_POST[to])/1000000), 3); |
08 |
print "transfer complete.
|
09 |
$_POST[from]
|
10 |
$_POST[to] : $size MB"; |
13 |
print " |
14 |
Remote File (please include http ://):
|
However, not all virtual hosts support this function. you have to check whether some functions are enabled. I don't know what functions are supported.
Then I wrote a script...