Hallo ich bin hier bei ispconfig 3 api am Programmieren

ww1com

New Member
Nachtrag, wo ich das originale PHP Script verwendet habe Client_add.php ging es. Wo ich jetzt die Array eingefügt habe zeigt es mir nichts mehr an. Das andere PHP Script Mail_user_add.php geht ja 100 %.

Ich habe noch eine Frage, wie kann ich Daten aus den ispconfig 3 API rausladen eine und auswerten invitieren. z. B. ob eine E-Mail schon vorhanden ist. Welche Subdomain es schon gibt.

Wer kann helfen
Jetzt habe ich da mal eine frage was mach ich falsch.
//Reg_Kunde.php
require 'config.php';

$API_IN_Firma = $_POST['Firma'];
$API_IN_Kontaktname = $_POST['Kontaktname'];
$API_IN_Kunden_Nr = $_POST['Kunden_Nr'];
$API_IN_Straße = $_POST['Straße'];
$API_IN_Postleitzahl = $_POST['Postleitzahl'];
$API_IN_Stadtl = $_POST['Stadt'];
$API_IN_Telefon = $_POST['Telefon'];
$API_IN_Handy = $_POST['Handy'];
$API_IN_Fax = $_POST['Fax'];

$API_IN_Email = $_POST['Email'];
$API_IN_Icq = $_POST['Icq'];
$API_IN_Internet = $_POST['Internet'];
$API_IN_Anmerkungen = $_POST['Anmerkungen'];
$API_IN_Nutzername = $_POST['Nutzername'];
$API_IN_Password = $_POST['Password'];
$API_IN_Language = $_POST['Language'];




$client = new SoapClient(null, array('location' => $soap_location,
'uri' => $soap_uri,
'trace' => 1,
'stream_context'=> stream_context_create(array('ssl'=> array('verify_peer'=>false,'verify_peer_name'=>false)))
));



try {
if($session_id = $client->login($username, $password)) {
echo 'Logged successfull. Session ID:'.$session_id.'<br />';
}
//18 parameters
//* Set the function parameters.
$reseller_id = 1; // this id has to be 0 if the client shall not be assigned to admin or if the client is a reseller
$params = array(
'company_name' => $API_IN_Firma,
'contact_name' => $API_IN_Kontaktname,
'customer_no' => $API_IN_Kunden_Nr,
'vat_id' => ' ',
'street' => $API_IN_Straße,
'zip' => $API_IN_Postleitzahl,
'city' => $API_IN_Stadtl',
'state' => $API_IN_Language,
'country' => 'de',
'telephone' => $API_IN_Telefon,
'mobile' =>$API_IN_Handy,
'fax' => $API_IN_Fax,
'email' => $API_IN_Email,
'internet' => $API_IN_Internet,
'icq' => $API_IN_Icq,
'notes' => 'awesome',
'default_mailserver' => 1,
'limit_maildomain' => -1,
'limit_mailbox' => -1,
'limit_mailalias' => -1,
'limit_mailaliasdomain' => -1,
'limit_mailforward' => -1,
'limit_mailcatchall' => -1,
'limit_mailrouting' => 0,
'limit_mailfilter' => -1,
'limit_fetchmail' => -1,
'limit_mailquota' => -1,
'limit_spamfilter_wblist' => 0,
'limit_spamfilter_user' => 0,
'limit_spamfilter_policy' => 1,
'default_webserver' => 1,
'limit_web_ip' => '',
'limit_web_domain' => -1,
'limit_web_quota' => -1,
'web_php_options' => 'no,fast-cgi,cgi,mod,suphp',
'limit_web_subdomain' => -1,
'limit_web_aliasdomain' => 1,
'limit_ftp_user' => -1,
'limit_shell_user' => 0,
'ssh_chroot' => 'no,jailkit,ssh-chroot',
'limit_webdav_user' => 0,
'default_dnsserver' => 1,
'limit_dns_zone' => -1,
'limit_dns_slave_zone' => -1,
'limit_dns_record' => -1,
'default_dbserver' => 1,
'limit_database' => -1,
'limit_cron' => 0,
'limit_cron_type' => 'url',
'limit_cron_frequency' => 5,
'limit_traffic_quota' => -1,
'limit_client' => 0, // If this value is > 0, then the client is a reseller
'parent_client_id' => 0,
'username' => $API_IN_Nutzername,
'password' => $API_IN_Password,
'language' => $API_IN_Language,
'usertheme' => 'default',
'template_master' => 0,
'template_additional' => '',
'created_at' => 0
);

$affected_rows = $client->client_add($session_id, $reseller_id, $params);

echo "Client: ".$affected_rows."<br>";


if($client->logout($session_id)) {
echo 'Logged out.<br />';
}


} catch (SoapFault $e) {
echo $client->__getLastResponse();
die('SOAP Error: '.$e->getMessage());
}

?>

<meta http-equiv="refresh" content="5; URL=http://hosting.ww1net.de/login">
 
Zuletzt bearbeitet:

Werbung

Top