Description
This function returns DNS zone information about a domain.
Examples
LiveAPI PHP Class
$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
$lookup_dnszone = $cpanel->api1('Net','dnszone', array('example.com') ); // Call the function.
LiveAPI Perl Module
my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
my $lookup_dnszone = $cpliveapi->api1('Net','dnszone', ['example.com'] ); # Call the function.
cPanel Tag System (deprecated)
Warning:
In cPanel & WHM version 11.30 and later, cPanel tags are deprecated. This example is present in order to help developers move from the old cPanel tag system to our LiveAPI.
We strongly recommend that you only use the LiveAPI system to call the cPanel APIs.
<cpanel Module="Net::dnszone( $FORM('example.com'))">
Output (plaintext)
; <<>> DiG 9.3.6-P1-RedHat-9.3.6-4.P1.el5_4.2 <<>> example.com
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 57253
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 3
;; QUESTION SECTION:
;example.com. IN A
;; ANSWER SECTION:
example.com. 172312 IN A 192.0.32.10
;; AUTHORITY SECTION:
example.com. 172312 IN NS b.iana-servers.net.
example.com. 172312 IN NS a.iana-servers.net.
;; ADDITIONAL SECTION:
a.iana-servers.net. 3496 IN A 192.0.34.43
b.iana-servers.net. 21112 IN A 193.0.0.236
b.iana-servers.net. 21112 IN AAAA 2001:610:240:2::c100:ec
;; Query time: 2 msec
;; SERVER: 208.74.121.103#53(208.74.121.103)
;; WHEN: Sat Mar 20 20:34:55 2010
;; MSG SIZE rcvd: 153
Parameters
Parameter
|
Type
|
Description
|
Possible values
|
Example
|
dnszone
|
string
|
Required
The domain name.
|
A valid domain name on the cPanel account.
|
example.com
|
Returns
This function returns the results of the domain query.