Create a blank php file where you want to upload or transfer files.
Add the following php codes to the blank php file and save it.
<?php /** * Transfer Files Server to Server using PHP fopen * @link https://dev.bdhostit.com */ set_time_limit(0); //Unlimited max execution time $file_name = 'bdhostit-backup.zip'; //New file name $url = 'http://www.wordpress.org/latest.zip'; //Source file URL. Need to change with your URL $copy = file_put_contents($file_name, fopen($url, "r")); //Transfer the file from source url to destination server //notice for success/failure if ( !$copy ){ echo 'Ops! Failed, You may check source file URL or <a target="_blank" href="http://dev.bdhostit.com/">Need help?> }else { echo 'WOW! Success'; } ?>
Leave a Reply