承接 redbox/dns 相关项目开发

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

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

redbox/dns

Composer 安装命令:

composer require redbox/dns

包简介

Quickly retrieve any type of DNS record you wish using PHP

README 文档

README

Build Status Scrutinizer Code Quality Code Coverage Twitter URL

Redbox-dns

Redbox-dns can be used to quickly query dns records a given domain. The API it self is extremely easy to use but you can always check out the examples directory for some examples.

Examples

In the examples directory you find usecases on how you can this class. Below you find an extremely easy way of receiving the mx records for Google.com and print them out. You can find this example once again in the examples directory.

$resolver = new \Redbox\DNS\Resolver();
$resolver->resolve('google.com', DNS_MX);

foreach($resolver as $record) {
    if ($record['type'] == 'MX')
        echo $record['type'] . ' ' . $record['pri'] . ' '. $record['target']."\n";
};

ouput

$ php ./mxrecords.php
MX 30 alt2.aspmx.l.google.com
MX 20 alt1.aspmx.l.google.com
MX 40 alt3.aspmx.l.google.com
MX 50 alt4.aspmx.l.google.com
MX 10 aspmx.l.google.com

Resolve Options

The second parameter to the resolve method can be used to define the desired record type to return. Below is a list of the available record types.

Type Record Type Description
DNS_ALL ALL Iteratively query the name server for each available record type
DNS_A A IPv4 Address Resource
DNS_CNAME CNAME Alias (Canonical Name) Resource
DNS_HINFO HINFO Host Info Resource
DNS_MX MX Mail Exchanger Resource
DNS_NS NS Authoritative Name Server Resource
DNS_PTR PTR Pointer Resource (Reverse DNS)
DNS_SOA SOA Start of Authority Resource
DNS_TXT TXT Text Resource
DNS_AAAA AAAA Pv6 Address Resource
DNS_SRV SRV Service record (SRV record)
DNS_NAPTR NAPTR Name Authority Pointer

Example: Retrieve all CNAME records

/* retreive all CNAME records */
$resolver->resolve('google.com', DNS_CNAME);

Installation

Using composer:

$ composer require redbox/dns

Installation trough archive download

If you download the package from a website (for example github.io or phpclasses.org or any other) you will need composer installed on your machine. The reason for this is that Redbox-dns comes without the require vendor directory which is required to run the package.

First of all if you don't have composer installed you can find it here follow the instructions and don't get intimidated in fact its really really easy to install.

In the this sample i will assume you have composer installed (on any machine). Go to the package root (where composer.json is located) and execute the following command.

$ composer install  --no-dev

Unit Testing

Redbox-dns comes with a suite of tests that you can run. The tests will be automaticaly run on trevis-ci.com and inspected on scrutinizer-ci.com.

Requirements

The following versions of PHP are supported by this version.

  • PHP 5.4
  • PHP 5.5
  • PHP 5.6
  • PHP 7.0
  • PHP 7.1
  • HHVM

License

Redbox-dns is released under the MIT public license.

LICENSE

Author

This package is created and maintained by Johnny Mast. If you have any questions feel free to contact me on twitter by using @mastjohnny in your tweet.

Enjoy

Oh and if you've come down this far, you might as well follow me on twitter.

redbox/dns 适用场景与选型建议

redbox/dns 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.39k 次下载、GitHub Stars 达 8, 最近一次更新时间为 2016 年 04 月 12 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「migration」 「server」 「tools」 「windows」 「dns」 「unix」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

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

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

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

  • 总下载量: 1.39k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 8
  • 点击次数: 19
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 8
  • Watchers: 2
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-04-12