Hello i try implement a SOAP client to add some sites on batch rotine to ispconfig 3 need migrate many sites. Database script with soap works nice.
I try run and no need SSL fields if you complete the SSL fields run without any problem if you not do it you be recive this error:
Error: ssl_state_error_regex<br>
ssl_locality_error_regex<br>
ssl_organisation_error_regex<br>
ssl_organistaion_unit_error_regex<br>
ssl_country_error_regex<br>
Anyway completing all fields the website created not show on panel. It´s strange because i try run to create again with the same domain name and recive this error:
Error: domain_error_unique<br>
Code:
<?php
$username = '';
$password = '';
$soap_location = '';
$soap_uri = '';
$client = new SoapClient(null, array('location' => $soap_location, 'uri' => $soap_uri));
try {
if($session_id = $client->login($username,$password)) {
echo "Logged:".$session_id."<br />\n";
}
$domain_name = "superdomainxxx1.com";
$params['server_id'] = 1;
$params['ip_address'] = "";
$params['domain'] = $domain_name;
$params['type'] = 'Site'; //Site / Alias
$params['parent_domain_id']="";
$params['vhost_type'] = 'Namebased'; //Namebased / IP-Based
$params['hd_quota'] = '100';
$params['cgi'] = 'n'; //n // y
$params['ssi'] = 'n';//n / y
$params['suexec'] = 'n'; //n / y
$params['errordocs'] = 1; //0 / 1
$params['subdomain'] = 'www.'; //none / www. / *.
$params['ssl'] = 'n'; //n / y
$params['php'] = 'Mod-PHP'; //Disabled, Fast-CGI, CGI, Mod-PHP, SuPHP
$params['active'] = 'y'; //n / y
$params['redirect_type'] = 'No redirect'; //array('' => 'No redirect', 'no' => 'No flag', 'R' => 'R', 'L' => 'L', 'R,L' => 'R,L')
$params['redirect_path'] = '';
$params['ssl_action'] = 'None';
/*$params['ssl_state'] = 'RJ';
$params['ssl_locality'] = 'Locale';
$params['ssl_organisation'] = 'Organization';
$params['ssl_organisation_unit'] = 'Dpto Tecnologia';
$params['ssl_country'] = 'BR';
$params['ssl_domain'] = 'ispconfigtest.com';
$params['ssl_request'] = '';
$params['ssl_cert'] = '';
$params['ssl_bundle'] = '';
$params['ssl_action'] = 'None'; //array('' => 'None', 'save' => 'Save Certificate', 'create' => 'Create Certificate','del' => 'Delete Certificate')*/
$client_id = 1;
$website_id = $client->sites_web_domain_add($session_id, $client_id, $params);
if($client->logout($session_id)) {
echo "Logout.<br />\n";
}
}
catch (SoapFault $e) {
die('Error: '.$e->getMessage());
}
?>
Regards 4 any
antecipated help.
Recent comments
12 hours 45 min ago
13 hours 45 min ago
17 hours 32 min ago
18 hours 46 min ago
22 hours 22 min ago
1 day 5 hours ago
1 day 14 hours ago
1 day 16 hours ago
2 days 7 hours ago
2 days 9 hours ago