定制 wdalmut/dns-srv 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

wdalmut/dns-srv

Composer 安装命令:

composer require wdalmut/dns-srv

包简介

README 文档

README

Use DNS SRV records to resolve services.

  • select records with minimum priority (as RFC 2782)
  • use a RR algorithm over weights in order to select the right service (as RFC). The RR uses a standard distribution (mean 0, variance 1).
use Corley\Service\Dns;
use Corley\Service\Resolve;

$dns = new Resolve(new Dns());

$config = $dns->resolve("www.corsi.walterdalmut.com");

echo $config["target"]; // 1.corsi.walterdalmut.com
echo $config["port"];   // 80
echo $config["pri"];    // the min priority (1)
echo $config["weight"]; // the rr weight resource (10)

Resolve all

The resolve method returns a single DNS resolution, with resolveAll we can get the list of services with the minimum priority

$config = $dns->resolveAll("www.corsi.walterdalmut.com");

var_dump($config); // minimum priority list: [["pri" => 1, ...],[...],[...]]

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-05-06

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固