The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Not able to add rDNS

Discussion in 'cPanel Developers' started by koonktech, Apr 28, 2014.

  1. koonktech

    koonktech Registered

    Joined:
    Apr 28, 2014
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    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:
    <?php
    include("xmlapi.php"); 

    $ip "103.243.49.41"
    $root_pass "PASSWORD_HERE"


    $xmlapi = new xmlapi($ip); 
    $results1 $xmlapi->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);
    ?>
    I would really appreciate if anybody could help me with this.

    I look forward to your kind reply.

    Regards
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    651
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    The following parameters are required:

    I notice you are using $ptr instead of $ptrdname.

    This is documented here:

    addzonerecord for PTR

    Thank you.
     
Loading...

Share This Page