commit | author | age
|
413d3b
|
1 |
<?php |
T |
2 |
|
b1a6a5
|
3 |
require 'soap_config.php'; |
413d3b
|
4 |
|
T |
5 |
|
|
6 |
$client = new SoapClient(null, array('location' => $soap_location, |
b1a6a5
|
7 |
'uri' => $soap_uri, |
MC |
8 |
'trace' => 1, |
|
9 |
'exceptions' => 1)); |
413d3b
|
10 |
|
T |
11 |
|
|
12 |
try { |
b1a6a5
|
13 |
if($session_id = $client->login($username, $password)) { |
413d3b
|
14 |
echo 'Logged successfull. Session ID:'.$session_id.'<br />'; |
T |
15 |
} |
b1a6a5
|
16 |
|
413d3b
|
17 |
//* Set the function parameters. |
T |
18 |
$client_id = 1; |
|
19 |
$params = array( |
b1a6a5
|
20 |
'server_id' => 1, |
MC |
21 |
'ip_address' => '', |
|
22 |
'domain' => 'tsssssubt.int', |
|
23 |
'type' => 'subdomain', |
|
24 |
'parent_domain_id' => 1, |
|
25 |
'vhost_type' => '', |
|
26 |
'document_root' => '/web/dom', |
|
27 |
'system_user' => 'benutzer', |
|
28 |
'system_group' => 'gruppe', |
|
29 |
'hd_quota' => 100000, |
|
30 |
'traffic_quota' => -1, |
|
31 |
'cgi' => 'y', |
|
32 |
'ssi' => 'y', |
|
33 |
'suexec' => 'y', |
|
34 |
'errordocs' => 1, |
|
35 |
'is_subdomainwww' => 1, |
|
36 |
'subdomain' => '', |
|
37 |
'php' => 'y', |
|
38 |
'ruby' => 'n', |
|
39 |
'redirect_type' => '', |
|
40 |
'redirect_path' => '', |
|
41 |
'ssl' => 'n', |
|
42 |
'ssl_state' => '', |
|
43 |
'ssl_locality' => '', |
|
44 |
'ssl_organisation' => '', |
|
45 |
'ssl_organisation_unit' => '', |
|
46 |
'ssl_country' => '', |
|
47 |
'ssl_domain' => '', |
|
48 |
'ssl_request' => '', |
|
49 |
'ssl_cert' => '', |
|
50 |
'ssl_bundle' => '', |
|
51 |
'ssl_action' => '', |
|
52 |
'stats_password' => '', |
|
53 |
'stats_type' => 'webalizer', |
|
54 |
'allow_override' => 'All', |
|
55 |
'apache_directives' => '', |
|
56 |
'php_open_basedir' => '/php', |
|
57 |
'custom_php_ini' => '', |
|
58 |
'backup_interval' => '', |
|
59 |
'backup_copies' => 1, |
|
60 |
'active' => 'y', |
|
61 |
'traffic_quota_lock' => 'n' |
|
62 |
); |
|
63 |
|
413d3b
|
64 |
$subdomain_id = $client->sites_web_subdomain_add($session_id, $client_id, $params); |
T |
65 |
|
|
66 |
echo "Subdomain ID: ".$subdomain_id."<br>"; |
b1a6a5
|
67 |
|
413d3b
|
68 |
if($client->logout($session_id)) { |
T |
69 |
echo 'Logged out.<br />'; |
|
70 |
} |
b1a6a5
|
71 |
|
MC |
72 |
|
413d3b
|
73 |
} catch (SoapFault $e) { |
T |
74 |
echo $client->__getLastResponse(); |
|
75 |
die('SOAP Error: '.$e->getMessage()); |
|
76 |
} |
|
77 |
|
|
78 |
?> |