hello, I am now so far that it works.
it was because of my script that it really was not. please excuse this.
However, I have now found a mistake that does not come from me.
here is my code:
class Einrichten{
public function mysql_db($db_name){
$data = array(
"key" => KEY_MYSQL_DB,
"action"=>'add',
"user" => USER,
"database" => $db_name
);
$this->aufruf_api($data,"databasemysql");
}
public function mysql_user($userdb,$dbase){
$pass = create_code(10);
$data = array(
"key" => KEY_MYSQL_USER,
"action"=>'add',
"user" => USER,
"userdb" => $userdb,
"dbase" => $db_name,
"pass" => $pass,
"host" => 'Localhost'
);
$this->aufruf_api($data,"usermysql");
}
public function domain_add($domain){
$data = array(
"key" => KEY_DOMAIN_ADD,
"action" => 'add',
"user" => USER ,
"type" => 'domain',
"name" => $domain,
"path" => 'vms_suee/'
);
$this->aufruf_api($data,"admindomains");
}
protected function aufruf_api($data,$url){
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, DOMAIN .$url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt ($ch, CURLOPT_POSTFIELDS, http_build_query($data));
curl_setopt ($ch, CURLOPT_POST, 1);
echo curl_errno($ch);
$response = curl_exec($ch);
curl_close($ch);
$response = json_decode($response);
$this->response = $response;
}
}
and the following is the return from the server:
stdClass Object
(
[status] => OK
[msj] => Domain testweise.vms1-scripte.de was removed
)
permissions etc are all law