pinga/desec-php

用于与DeSec API交互的PHP库

v0.5 2023-07-17 22:51 UTC

This package is auto-updated.

Last update: 2024-09-30 09:15:05 UTC


README

这是一个用于与deSEC API交互的PHP库。deSEC是一个以安全为核心设计的免费DNS anycast托管服务。使用此库,您可以轻松管理您的域名、DNS记录等。

安装

使用Composer安装DeSec PHP库。

composer require pinga/desec-php

使用方法

<?php

require 'vendor/autoload.php';

$api = new \deSEC\deSEC("your-api-token");  // Replace with your actual API token

try {
    $response = $api->getDomain('example.com');
    print_r($response);
} catch (Exception $e) {
    echo 'Caught exception: ',  $e->getMessage(), "\n";
}

可用方法

以下是此库中的一些可用方法

  • getDomain($name)
  • createDomain($name)
  • deleteDomain($name)
  • exportZonefile($name)
  • createRRset($name, $subname, $type, $ttl, $records)
  • getRRsets($name)
  • getRRset($name, $subname, $type)
  • modifyRRset($name, $subname, $type, $ttl, $records)
  • deleteRRset($name, $subname, $type)

贡献

欢迎提交拉取请求。对于重大更改,请先提交问题来讨论您想进行哪些更改。

许可证

本项目采用MIT许可证 - 有关详细信息,请参阅LICENSE文件。