dev-master
9999999-dev
MIT
The Development Requires
0.0.2
0.0.2.0
MIT
The Development Requires
Wallogit.com
2017 © Pedro Peláez
Use DNS SRV records to resolve services., (*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)
The resolve method returns a single DNS resolution, with resolveAll we can
get the list of services with the minimum priority, (*2)
$config = $dns->resolveAll("www.corsi.walterdalmut.com");
var_dump($config); // minimum priority list: [["pri" => 1, ...],[...],[...]]
MIT
MIT