$soap_location,
'uri' => $soap_uri));
try {
//* Login to the remote server
if($session_id = $client->login($username,$password)) {
echo 'Logged into remote server sucessfully. The SessionID is '.$session_id.'
';
}
//* ----------------------------------------------------------
//* Example functions
//* ----------------------------------------------------------
/*
//* Add a email domain
$params = array( 'server_id' => 1,
'domain' => 'test.com',
'active' => 'y');
$client_id = 0;
$domain_id = $client->mail_domain_add($session_id, $client_id, $params);
*/
/*
//* Update email domain
$params = array( 'server_id' => 1,
'domain' => 'test.org',
'active' => 'y');
//* ID of the client. 0 = the admin owns this record.
$client_id = 0;
// ID of the domain whch shall be updated.
$domain_id = 1;
// Call the domain update function
$domain_id = $client->mail_domain_update($session_id, $client_id, $domain_id, $params);
*/
//* Logout
if($client->logout($session_id)) {
echo 'Logged out sucessfully.
';
}
} catch (SoapFault $e) {
die('SOAP Error: '.$e->getMessage());
}
?>