Coder Social home page Coder Social logo

parameters for addzonrecord about xmlapi-php HOT 1 OPEN

cpanelinc avatar cpanelinc commented on June 26, 2024
parameters for addzonrecord

from xmlapi-php.

Comments (1)

integrateddigital avatar integrateddigital commented on June 26, 2024

@ajdove

I think the record name in this case would be the slt.tld. ( not the period at the end )
...... [ if you look at how DNS records are setup .. this is inherited from @ .. hostname and period )
here's an example of editing a zone with arguments ..

  1. read the zone and find the line# you want to edit
  2. edit the zone providing that line#

I understand you are trying to Add rather than Edit, but perhaps this will shed some light, giving
the $recordname is the same in this case;

( for adding a zone we actually use addondomain api 2 - it creates it in cpanel, and also creates the dns zone, ping me if you want an example of that too ) ..

hope it helps:

for #1:
.. $fetch_zone = $json_client->api2_query( $cpaneluser, 'ZoneEdit', 'fetchzone', $domainarg ) ;
( and $domainarg is $domainarg = array ( 'domain' => $domain, 'type' => 'A'); - in
our case, we are looking into editing the A pointing )

for #2:
$resultstr = $json_client->api2_query( $auth_user, 'ZoneEdit', 'edit_zone_record', $dnsargs );

but in this case the $dnsargs would be:
$dnsargs = array('Line' => $DNS_RECORD_LINE_NUMBER, 'domain' => $domain,
'name' => $record_name, 'type' => 'A', 'address' => $ip2go,
'ttl' => '14400', 'class' => 'IN',
);

where:
-$DNS_RECORD_LINE_NUMBER was fetched on #1
now the $record that you are asking about should be:
-$record is the domain name that you are adding -with a period ( domain.com. <-note period at the end)
-$type is A .. in our context.
..

hope that helps,

from xmlapi-php.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.