Hallo,
ich habe nun eine SOAP API Programmiert, er legt benutzer, HostingPlan alles aus außer die Domain:
Code
# Configuration parameters:
$user = 'admin';
$pass = 'xxxxx';
$url = 'https://xxx/liveconfig/soap';
# Construct WSDL URL
$wsdl_url = $url
.'?wsdl'
.'&l=' . urlencode($user)
.'&p=' . urlencode($pass);
# Create SOAP client
$client = new SoapClient($wsdl_url,
array('style' => SOAP_DOCUMENT,
'use' => SOAP_LITERAL,
)
);
# Construct SOAP token:
$ts = gmdate("Y-m-d") . "T" . gmdate("H:i:s") . ".000Z";
$token = base64_encode(hash_hmac('sha1',
'LiveConfig' . $user . 'HostingDomainAdd' . $ts,
$pass,
true
)
);
$auth = array('login' => $user,
'timestamp' => $ts,
'token' => $token);
$subs = "web".$kundennummer;
$params = array('auth' => $auth,
'subscription' => 'web15',
'domain' => 'strato.de',
'mail' => '1',
'web' => '/');
try {
$response = $client->HostingDomainAdd($params);
} catch (SoapFault $soapFault) {
die("useradd Error while calling Web Service: " . $soapFault->faultstring . "\n");
}
Alles anzeigen
Vertragsnummer ist web15.
Hoffe um hilfe