I just wrote this library for cPanel jSON-APIs based on their documentation and jordih.net's links to this documentation. This is not well documented, but the bottom line is:
Create a zone_records object by calling
$zones = new zone_records("cpaneluser", "pass", "website_to_login", "domain_of_records")
, - 127.0.0.1, , .
$zones->DNSrecords. DNS A CNAME ( DNSrecord). ( TXT) , () .
DNS (, target, ttl, name, type), , private, $record->ttl, "" __get. "" __set ttl target ( , API, , ).
$zones->addrecord($type, $target, $name, $ttl)
,
$zones->deleterecord($line)
, $line - $record->line.
ZoneEdit,
$zones->doquery("function_from_API", array("parameters=>"here"), array("headers"=>"here"))
cPanel ( addrecord deleterecord). , try {...} catch (Exception $e) {...}, , / - ( , ).
- https://github.com/ShadowLNC/cpanel_dns (classdns.php - , dns_update.php ).