forked from Guru-Digital-Archive/ispconfig-remote-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
20 lines (16 loc) · 683 Bytes
/
index.php
File metadata and controls
20 lines (16 loc) · 683 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?php
require './vendor/autoload.php';
$cp = new \GDM\ISPConfig\SoapClient('https://127.0.0.1:8080/remote/index.php', 'admin', 'mysecurepassword');
$clientId = $cp->clientAdd("My Client", "My Clients Company", "myclient", "myclientspassword", "contact@myclient.com", "000000");
$siteId = false;
if ($clientId) {
$siteId = $cp->sitesWebDomainAdd($clientId, "myclient.com", "255.255.255.1");
} else {
echo "Failed to create client " . $cp->getLastException()->getMessage();
}
if ($siteId) {
echo "Created client with id $clientId ";
echo "Created site with id $siteId ";
} else {
echo "Failed to create site " . $cp->getLastException()->getMessage();
}