Using PHP to remotely download files to space _php tutorial

Source: Internet
Author: User
Just to move to the blog, the plan is to transfer two of space data but encountered some problems, the packaging of the file is too big to think of PHP can download files remotely
And then I wrote a script!
01
02 if($_GET[xfer]) {

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";

11 }
12 }else{

13 print "
14 远程文件下载地址(请带上http://):

15 保存文件名:
16 ";

17 }
18 ?>
But not all of the virtual hosts are supported, to see whether some functions are open, what function I do not know

http://www.bkjia.com/PHPjc/477848.html www.bkjia.com true http://www.bkjia.com/PHPjc/477848.html techarticle just to move the blog, plan to move two of space data to migrate but encountered some problems, the packaging of the file is too big to think of PHP can download the file remotely and then wrote a script ...

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.