Hi,
I'm using the API1 to do remote backups for a couple of my clients.
I would like to check if they username/password is correct before I try to create the backups.
How do I do that?
This is my current code to create the backups (using the xmlapi.php provided by cpanel).
PHP Code:function start() {
$xmlapi = new xmlapi($this->host);
$xmlapi->password_auth($this->cpuser,$this->cppass);
$xmlapi->set_http_client($this->http_client); // Default: cURL
$xmlapi->set_port($this->port);
$xmlapi->set_debug(1);
$api_args = array(
'ftp', // destination type
$this->ftphost, // destination address
$this->ftpuser, // ftp user
$this->ftppass, // ftp password
$this->notify, // email to notify
21, // port
'/'.$this->ftpfolder // remote path to put file
);
return $xmlapi->api1_query($this->cpuser,'Fileman','fullbackup',$api_args);
}


LinkBack URL
About LinkBacks
Reply With Quote