API make/restore backup

npeters

New member
Joined
Mar 20, 2007
Messages
1
Hi,

At the moment i need a PHP script to make a backup to another FTP and restore a backup from another FTP.

Can someone please help me with this? I'm using the API class (httpsocket.php) but i don't know how to solve this.

Searching gave me the following code:

<?php
$sock = new HTTPSocket;
$sock->connect('domain.nl',2222);
$sock->set_login('username','password');
$sock->set_method('POST');
$sock->query('/CMD_SITE_BACKUP',
array(
'action' => 'backup',
'domain' => 'domain.nl',
'select0' => 'domain',
'select1' => 'subdomain',
'select2' => 'email',
'select3' => 'forwarder',
'select4' => 'autoresponder',
'select5' => 'vacation',
'select6' => 'list',
'select7' => 'emailsettings',
'select8' => 'ftp',
'select9' => 'ftpsettings',
'select10' => 'database',
'create' => 'Create'
));

$result = $sock->fetch_body();
echo $result;
?>

But this code makes a backup on local FTP, i need it to be made at an external FTP server. And i can't find a restore example code.

Thanks in advance.

N
 
Last edited:
Back
Top