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
其他信息
- 授权协议: MIT
- 更新时间: 2016-05-06