Description
amphp/dns is a PHP library for non-blocking DNS in the AMPHP collection of event-driven libraries built on fibers. It resolves hostnames to IP addresses and queries specific DNS records without blocking your program. You install it with Composer, then call its resolver from your code. The library detects the system configuration on its own: on Unix-like systems it reads /etc/resolv.conf and respects nameserver, timeout and attempt settings, and on Windows it reads the correct entries from the Windows Registry. The docs cover custom queries for record types, a caching section, and how to reload the configuration at runtime. The package is part of AMPHP, which provides asynchronous building blocks for PHP, and the docs list its version and related packages. Developers who build asynchronous PHP servers or clients that need DNS lookups are the intended users. The project is open source and its code is on GitHub.…
Ratings & Reviews
No ratings yet
Be the first to rate DNS.
People also visit
DNS FAQ
What does amphp/dns do?
It resolves hostnames to IP addresses and queries DNS records without blocking, for PHP programs built on Amp.
How do I install it?
Install it as a Composer dependency with composer require amphp/dns.
How does it find my DNS servers?
It reads the system configuration automatically. On Unix-like systems that is /etc/resolv.conf, and on Windows it is the Windows Registry.
Where is the source?
The project is open source, and its README, releases and license are on GitHub.
What are the best DNS alternatives?
Popular alternatives to DNS include DNS, Knot Resolver and dnspython. See all DNS alternatives
