Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Copy files from one domain to another on same server.

Discussion in 'cPanel Developers' started by pawan0446, Jun 6, 2017.

  1. pawan0446

    pawan0446 Registered

    Joined:
    Jun 6, 2017
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    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&contactemail=userdemo@userdemo.com[/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
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,427
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page