php-如何使用powerdns的接口
powerdns安装教程 如何使用powerdns的http-api ? 文档需知 powerdns文档 Swagger接入开发 powerdns的yaml配置文件 | swagger官网 Swagger 生成插件 Sign in 登录 (没有账号的免费注册一个) Create New -> Create New API 创建完毕将powerdns的yaml配置文件粘贴到代码框中 右上角 -> Export -> Client SDK -> 指定的开发语言,像我就用PHP github创建一个新的 repository , 将导出来的文件上传上去 修改composer.json { "repositories": [ { "type": "git", "url": "https://github.com/suguer/powerdns.git" } ], "require": { "suguer/powerdns": "*@dev" } } 开始使用 DnsPowerDnsClient.php use Swagger\Client\Api\ZonesApi; use Swagger\Client\ApiException; use Swagger\Client\Model\RRSet; use Swagger\Client\Model\Zone; use Swagger\Client\Configuration; class DnsPowerDnsClient { private $server_id = "localhost"; /** * @var \GuzzleHttp\Client */ private $client; /** * @var ZonesApi */ private $zoneApi; private $currentNsList = ['ns1','ns2']; public function __construct() { $config=[ "ip" => "", "api_key" => "", ]; $this->client = new \GuzzleHttp\Client([ 'timeout' => 40....