Hello, i have one script to create emails in cpanel, with reseller account it's ok but in client accounts i have the error:Access denied 0 Access denied.
follow script in resseler account:
<?php
include_once("xmlapi.php");
$account_pass = "secret^^";
$ip = '64.31.16.90';
$account = "secret^^";
$email1 = "testmatheustest";
$email_password = "maisvendas";
$email_domain = "visolutions.com.br";
$email_quota = '0';
$xmlapi = new xmlapi($ip);
$xmlapi->password_auth($account, $account_pass);
//$xmlapi->set_port(2083);
$xmlapi->set_output('xml');
echo $xmlapi->api1_query($account, "Email", "addpop", array($email1, $email_password, $email_quota, $email_domain));
?>
and the script for client account(not working):
<?php
include_once("xmlapi.php");
$account_pass = "secret^^";
$ip = '64.31.16.90';
$account = "secret^^";
$email1 = "testmatheustest";
$email_password = "maisvendas";
$email_domain = "boabarganha.com.br";
$email_quota = '0';
$xmlapi = new xmlapi($ip);
$xmlapi->password_auth($account, $account_pass);
//$xmlapi->set_port(2083);
$xmlapi->set_output('xml');
echo $xmlapi->api1_query($account, "Email", "addpop", array($email1, $email_password, $email_quota, $email_domain));
?>
follow script in resseler account:
<?php
include_once("xmlapi.php");
$account_pass = "secret^^";
$ip = '64.31.16.90';
$account = "secret^^";
$email1 = "testmatheustest";
$email_password = "maisvendas";
$email_domain = "visolutions.com.br";
$email_quota = '0';
$xmlapi = new xmlapi($ip);
$xmlapi->password_auth($account, $account_pass);
//$xmlapi->set_port(2083);
$xmlapi->set_output('xml');
echo $xmlapi->api1_query($account, "Email", "addpop", array($email1, $email_password, $email_quota, $email_domain));
?>
and the script for client account(not working):
<?php
include_once("xmlapi.php");
$account_pass = "secret^^";
$ip = '64.31.16.90';
$account = "secret^^";
$email1 = "testmatheustest";
$email_password = "maisvendas";
$email_domain = "boabarganha.com.br";
$email_quota = '0';
$xmlapi = new xmlapi($ip);
$xmlapi->password_auth($account, $account_pass);
//$xmlapi->set_port(2083);
$xmlapi->set_output('xml');
echo $xmlapi->api1_query($account, "Email", "addpop", array($email1, $email_password, $email_quota, $email_domain));
?>