承接 danog/libdns-native 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

danog/libdns-native

Composer 安装命令:

composer require danog/libdns-native

包简介

Encoder/decoder for PHP's dns_get_record raw format based on libdns

README 文档

README

Build Status License

Encoder/decoder for the raw format of PHP's dns_get_record function based on libdns: allows usage of the function to fetch all kinds of DNS records, not just the ones supported by the DNS_ constants.

The API consists of a NativeEncoderFactory that creates NativeEncoder objects, that can encode libdns Message objects to a list of parameters that that must be passed to the dns_get_record function.

The NativeDecoderFactory creates NativeDecoder objects, that accept the results of the dns_get_record function and decode them back to Message objects.

Installation

composer require danog/libdns-native

Usage

<?php

require 'vendor/autoload.php';

use danog\LibDNSNative\NativeEncoderFactory;
use danog\LibDNSNative\NativeDecoderFactory;
use LibDNS\Records\QuestionFactory;
use LibDNS\Records\ResourceQTypes;
use LibDNS\Messages\MessageFactory;
use LibDNS\Messages\MessageTypes;

$question = (new QuestionFactory)->create(ResourceQTypes::DNSKEY);
$question->setName('daniil.it');

$message = (new MessageFactory)->create(MessageTypes::QUERY);
$records = $message->getQuestionRecords();
$records->add($question);

$encoder = (new NativeEncoderFactory)->create();
$question = $encoder->encode($message);

$result = dns_get_record(...$question);

$decoder = (new NativeDecoderFactory)->create();
$result = $decoder->decode($result, ...$question);

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-07-15

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固