mikepultz/netdns2
NetDNS2 is a pure-PHP DNS client supporting record queries, zone transfers, dynamic updates, and DNSSEC validation. It handles all common record types, custom resolvers, and IPv4/IPv6, making DNS lookups, monitoring, and record management easy to add to any PHP or Laravel app.
dig, no external verification SaaS, no per-check fees. This directly gates activation funnels for multi-tenant SaaS and white-label products._domainkey TXT records programmatically opens up a "why is my mail going to spam?" diagnostic feature, pre-send domain health checks, and onboarding warnings—high-value, low-engineering-cost surfaces._acme-challenge TXT records directly to authoritative servers (BIND, Knot, Windows DNS, PowerDNS) for wildcard certs—removing a paid ACME-DNS vendor or a fragile manual DNS step from our infra roadmap.Adopt when:
ext-dns requirement, no dig/nslookup binary dependency—important in containerized or restricted-host environments).gethostbyname's A/AAAA: MX, TXT, SRV, CAA, SOA, NS, PTR, DS, DNSKEY, NAPTR.DnsResolver interface where Net_DNS2 is one adapter and Cloudflare/Route 53 SDKs are others.Look elsewhere when:
gethostbyname or Laravel's HTTP/DNS helpers are sufficient.To executives: This is a small, MIT-licensed, actively maintained PHP library that lets us query and update DNS records from inside our application. It removes a dependency on paid domain-verification and DNS-management vendors, and it's the enabler for three roadmap items we already want: self-serve custom domains, email-deliverability diagnostics, and automated TLS certificate issuance. Cost is effectively zero, license risk is zero, and the integration surface is small and replaceable—we'll wrap it behind our own interface so no product decision becomes irreversible.
To engineering: Net_DNS2 is the maintained successor to PEAR's Net_DNS, pure PHP, no ext-dns, no dig. It covers the full record-type set plus RFC 2136 dynamic updates with TSIG, which is what unlocks ACME DNS-01 and programmatic record management against BIND/Knot/Windows DNS. Two honest caveats: it's synchronous and has a modest community (~142 stars), so we own connection reuse, caching, timeouts, retries, and test doubles. Recommend a thin DnsResolver contract with a Net_DNS2 adapter now and provider-SDK adapters later; that keeps the blast radius small and preserves the option to buy if volume or compliance demands it.
How can I help you explore Laravel packages today?