Hello everyone.
I'm working on a project right now to create automaticly account and send files after the account creation.
I'm working with XML API.
Right now, createaccs is working very well without any problem.
But i'm trying to make uploadfiles working but i've alway the same error which is
But i already specified the upload file.
Here is my PHP code, and i had tryed everything, every form of path, with / or without...
Still have the same error.
Can someone tell me what is the problem :\ ?
Will be very appreciated.
Thank
I'm working on a project right now to create automaticly account and send files after the account creation.
I'm working with XML API.
Right now, createaccs is working very well without any problem.
But i'm trying to make uploadfiles working but i've alway the same error which is
Code:
{"cpanelresult":{"event":{"result":1},"error":"You must specify at least one file to upload.","apiversion":2,"data":[{"uploads":[],"succeeded":0,"failed":0,"warned":0}],"module":"Fileman","func":"uploadfiles"}}
Here is my PHP code, and i had tryed everything, every form of path, with / or without...
Still have the same error.
PHP:
<?php
// Must include cPanel API
include "xmlapi.php";
// Credentials for cPanel account
$source_server_ip = "xxxx"; // Server IP or domain name eg: 212.122.3.77 or cpanel.domain.tld
$cpanel_account = "xxxx"; // cPanel username
$cpanel_password = "xxxx"; // cPanel password
$xmlapi = new xmlapi($source_server_ip);
$xmlapi->password_auth($cpanel_account,$cpanel_password);
$xmlapi->set_port('2083');
$destination_dir = "home/myAccount/public_html/gros";
$newdir_name = "public_html/wp-links-opml.php";
$api2args = array(
'dir'=> 'public_html/gros',
'file-1' => '/home/immobill/accont/wp-links-opml.php'
);
$xmlapi->set_output('json');
print $xmlapi->api2_query($cpanel_account, 'Fileman', 'uploadfiles', $api2args);
?>
Will be very appreciated.
Thank