Skip to content

Commit e5ac917

Browse files
committed
Add example for domains_domain_update
1 parent c42fed0 commit e5ac917

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<?php
2+
3+
require 'soap_config.php';
4+
5+
6+
$client = new SoapClient(null, array('location' => $soap_location,
7+
'uri' => $soap_uri,
8+
'trace' => 1,
9+
'exceptions' => 1));
10+
11+
12+
try {
13+
if($session_id = $client->login($username, $password)) {
14+
echo 'Logged successfull. Session ID:'.$session_id.'<br />';
15+
}
16+
17+
//* Set the function parameters.
18+
$client_id = 1;
19+
$primary_id = 42; // The domain_id
20+
$params = array(
21+
'domain' => 'cellar.door'
22+
);
23+
24+
$domain_id = $client->domains_domain_update($session_id, $client_id, $primary_id, $params);
25+
26+
echo "Domain ID: ".$domain_id."<br>";
27+
28+
if($client->logout($session_id)) {
29+
echo 'Logged out.<br />';
30+
}
31+
32+
33+
} catch (SoapFault $e) {
34+
echo $client->__getLastResponse();
35+
die('SOAP Error: '.$e->getMessage());
36+
}
37+
38+
?>

0 commit comments

Comments
 (0)