Comments (1)
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 ..
- read the zone and find the line# you want to edit
- 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)
- addsubdomain HOT 2
- api2_query listdbs filter does not work
- Add AddonDomain HOT 2
- Update the XML-api source code
- Subdomain creation using php HOT 1
- Uncaught exception 'Exception' for adddb HOT 6
- Uncaught exception 'Exception' for createacct HOT 1
- Composer HOT 1
- Implement PSR-4 Standard
- Not able to create database user
- Exec Addsubdomain and save file
- Function addsubdomain running twice
- ::EditZone / Permission / 200k+ domains
- https://github.com/CpanelInc/xmlapi-php/blob/master/xmlapi.php#L2446
- Password strength test?
- How to implement with JSON serialization HOT 1
- For windows server
- Trying to Create Database, User but, getting error and After debug it's saying " HTTP error 404 ". Don't have any idea why. Please help, Thanks HOT 1
- Database
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xmlapi-php.