Hello
I am using the xml-api for cpanel-WHM to get details.I want to check if a domain already exists before a new one is created.
I came across the
function and tried to implement it.This has two optional parameters
.But if I have to check if a domain exists it returns true even if some part of the string matches the search string.I want the entire string to be checked and validated.So I thought of getting all the results using
and then search if the domain already exists or not.This is my code
Now,the page outputs all the accounts with details of each account,but i want to check only the domain name of all accounts.I tried to use
etc but did not get only the domain names of all accounts.How can I get only the domain names of all accounts and then check for the existing one?
Thank you for your time.
I am using the xml-api for cpanel-WHM to get details.I want to check if a domain already exists before a new one is created.
I came across the
Code:
listaccts()
PHP:
searchType and searchString
Code:
listaccts()
PHP:
$result= $xmlapi->listaccts();
$json = json_encode($result);
$array = json_decode($json,TRUE);
echo "<br/><b>Account list is</b> <pre>";
print_r($array);
echo "</pre>";
Code:
$array['domain']
Thank you for your time.
Last edited: