Copy files from one domain to another on same server.

pawan0446

Registered
Jun 6, 2017
1
0
1
india
cPanel Access Level
Reseller Owner
Hello,

I am looking for API to copy file from one account(domain) to another account(domain) through resellar account.

i have also created dynamic account using WHM API-1 and copy file through following API method:

WHM API 1 Functions - createacct - Software Development Kit - cPanel Documentation

My request is like:

Code:
[URL]https://hostname.example.com:2087/json-api/createacct?api.version=1&username=userdemo&domain=userdemo.com&[email protected][/URL]
Some codes: using XMLAPI PHP

Code:
$testArgs = array(
           'sourcefiles'      => '/home/user1/public_html/domntest/moveto.zip',
           'destfiles'        => '/home/user2/public_html/domntest/moveto.zip',
           'op' => 'copy'
          );
$r = $this->xmlapi->api2_query('user', "Fileman", "fileop", $testArgs );
Referred threads:

1. Copy Files From To cPanel Accounts Using API?
2. How to Copy file between account with xml-api, api2?

Please check above and let me know where am I doing wrong or is there any different approach to get done my task.


Any kind of help is much appreciated.

Thanks