Using PHP Copy to move files from server to server.

You can just create a php file in the destination server and load the file once in your browser. For example you add this code in http://destination-url/copy-files.php and in copy-files.php you add this php code:


  Transfer Files Server to Server using PHP Copy



/* Source File URL */

$remote_file_url =http://origin-server-url/”


/* New file name and path for this file */


/* Copy the file from source url to server */

$copy = copy( $remote_file_url, $local_file );

/* Add notice for success/failure */

if( !$copy ) {

    echo “Doh! failed to copy $file…\n”;



    echo “WOOT! success to copy $file…\n”;



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s