How to add Addon Domains using Cpanel API or something?
Hello, I am searching about how to add addon domains using cpanel api but they seems obsolete.
Thank you in advance.
-
I try to use xmlapi and do: require_once __DIR__ . "/../../utils/xmlapi.php"; $xmlapi = new xmlapi("IP"); $xmlapi->set_port(2082); $xmlapi->password_auth("USER", "PASS"); $xmlapi->set_debug(1); $result = $xmlapi->api2_query("USER", 'AddonDomain', 'addaddondomain', array('dir' => 'customdomain1.com', 'newdomain' => 'domain1.com', 'subdomain' => 'domain1')); var_dump($result);
but the result is null. There is no error0 -
Solved using: mgufrone/cpanel-php 0 -
xml-api is indeed deprecated and it's not even listed any longer in the cpapi2 documentation. You need to use one of the supported formats, there is nothing wrong with the API function itself: cPanel API 2 Functions - AddonDomain::addaddondomain - Developer Documentation - cPanel Documentation 0
Please sign in to leave a comment.
Comments
3 comments