gbxyz/czds 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

gbxyz/czds

Composer 安装命令:

composer require gbxyz/czds

包简介

PHP client for ICANN's Centralized Zone Data Service (CZDS)

README 文档

README

This repository contains a simple client library for accessing ICANN's Centralized Zone Data Service (CZDS).

All gTLDs (top-level domains such as .com or .org) provide access to their DNS zone files via the CZDS.

You will need to create a user account on the CZDS, and request access to at least one TLD, for this to be useful!

Installation

Add the library as a dependency to your project using composer:

composer require gbxyz/czds

Usage

Load the library into your code using Composer's autoload function:

require_once 'vendor/autoload.php';

Create a client object

$client = new gbxyz\czds\client;

$client->login($username, $password);

The CZDS API issues authentication tokens that are valid for 24 hours. These tokens are cached locally so this method will only incur an HTTP round trip once per day.

Get a list of available zone files

This returns an array of TLDs:

$zones = $client->getZones();

This will return an array like ['foo', 'bar'].

Save a zone file to disk

$client->saveZone($zone, '/tmp/zonefile.txt');

$zone should be a string containing the TLD name, e.g. xyz.

If this fails an exception will be thrown.

Get a file descriptor for a zone file

$fh = $client->getZoneHandle($zone);

echo stream_get_contents($fh);

Get the contents of a zone file

$zone = $client->getZoneContents($zone);

echo $zone;

Get an iterator

This is useful for large zones. Instead of loading the entire zone into memory, you get an object can be iterated on, which returns objects which are instances of the various Net_DNS2_RR_* classes.

$iterator = $client->getZoneRRs($zone);

foreach ($iterator as $rr) {
    printf("Owner name: %s, TTL: %u, type: %s\n", $rr->name, $rr->ttl, $rr->type);
    echo (string)$rr;
}

gbxyz/czds 适用场景与选型建议

gbxyz/czds 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 15 次下载、GitHub Stars 达 2, 最近一次更新时间为 2023 年 07 月 26 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 gbxyz/czds 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 gbxyz/czds 我们能提供哪些服务?
定制开发 / 二次开发

基于 gbxyz/czds 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 15
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 17
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2023-07-26