Hello everyone!
I have a question about this integration: http://cpanel.net/remoteaccess-php.html
When I run the "createacct" function everything works out fine however, if a domain already exists on my server I get the following error:
Sorry, a DNS entry for domain.com already exists, please delete it first (from all servers in the dns cluster)
That's not the best error message to display to clients... I tried doing something like this but it didn't work, any suggestions?
When I print $test->errors[0] and "Sorry, a DNS entry for $domain already exists, please delete it first (from all servers in the dns cluster)" they are the same but it doesn't actually get inside.PHP Code:if ($test->errors[0] == "Sorry, a DNS entry for $domain already exists, please delete it first (from all servers in the dns cluster)") {
$test->errors[0] = "something else";
print $test->errors[0];
}
Here is how the messages are handled now in the class:
It would be nice if there was something like this:PHP Code:if($xml->result->status==1)
{
$result['status']=$xml->result->status;
$result['statusmsg']=$xml->result->statusmsg;
$result['ip']=$xml->result->options->ip;
$result['nameserver']=$xml->result->options->nameserver;
$result['nameserver2']=$xml->result->options->nameserver2;
$result['nameserver3']=$xml->result->options->nameserver3;
$result['nameserver4']=$xml->result->options->nameserver4;
$result['package']=$xml->result->options->package;
$result['rawout']=$xml->result->rawout;
return $result;
}
else
{
$this->errors[]=$xml->result->statusmsg;
return false;
}
statuscode would contain a numeric value so I can do a switch statement on that value to display what I would like to display.PHP Code:$this->errors[]=$xml->result->statuscode;
I hope that helps.
Let me know if you need more info from me.
Thanks,
Luke



LinkBack URL
About LinkBacks
Reply With Quote





