Not able to add rDNS
Hi,
I am new to cPanel API and I'm really excited to use it.
Here is the code that I am using and it always returns NULL:
[PHP]
password_auth("root",$root_pass);
$xmlapi->set_debug(1);
$zone='164.240.103.in-addr.arpa';
$name='11';
$ptr='example.com';
$type='PTR';
$results = $xmlapi->addzonerecord($zone,$name,$ptr,$type);
var_dump($results);
?>[/PHP]
I would really appreciate if anybody could help me with this.
I look forward to your kind reply.
Regards
-
Hello :) The following parameters are required: [QUOTE]zone string The name of the reverse DNS zone file to create. name string Enter the last octet of the IP address here (For example, if the IP address is 192.168.0.1, you would enter a 1 here). ptrdname string The name of the domain to which the IP address will resolve (For example, example.com). type string You must set this parameter to PTR.
I notice you are using $ptr instead of $ptrdname. This is documented here: addzonerecord for PTR Thank you.0
Please sign in to leave a comment.
Comments
1 comment