• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

PHP - Plesk 12.5.x API no longer works on my site

DerJustin

New Pleskian
Hello community,

a few weeks ago I succesfully create customer via PHP, but now will the API no longer works on my site.
The result is bool(false).

I hope you can help me and sorry for my bad english.

<?
#Plesk Country [start]
if($country == "Deutschland"){
$plesk_country = "DE";
}elseif($country == "Frankreich"){
$plesk_country = "FR";
}elseif($country == "Italien"){
$plesk_country = "IT";
}elseif($country == "Österreich"){
$plesk_country = "AT";
}elseif($country == "Schweiz"){
$plesk_country = "CH";
}elseif($country == "Tschechien"){
$plesk_country = "CZ";
}
#Plesk Country [end]

$params = array(
'contact_name' => $firstname.' '.$lastname,
'username' => strtolower($username),
'password' => $_SESSION['ori_password'],
'phone' => $phone_number,
'email' => $email,
'address' => $street.' '.$house_number,
'city' => $place,
'post_code' => $zip,
'country' => $plesk_country
);

$request = new \pmill\Plesk\CreateClient($config, $params);
$info = $request->process();
exit(var_dump($info));
?>

Sincerly,
Justin
 
Back
Top