jeremykendall/php-domain-parser
Parse, validate, and normalize domains, subdomains, and suffixes using the Public Suffix List. Extract registrable domain vs. subdomain, handle IDNs and edge cases, and keep parsing rules current via PSL updates—ideal for URL processing, cookies, and security checks.
co.uk or xn-- IDNs)..com vs. .gov).*.customer.yourservice.com).tld.js).example.co.uk, xn--bcher-kva.ch) is critical.rubix/ml-idn).publicsuffixlist; Node.js: tldjs).For Executives: *"This package lets us handle domain parsing—like validating emails, detecting phishing risks, or enabling custom domains for our SaaS—without building or maintaining the complex logic ourselves. It’s used by 1,200+ projects, MIT-licensed, and updated regularly. For example, we could use it to:
For Engineering: *"This is a drop-in PHP package that solves domain parsing with:
co.uk, xn-- domains, etc.).Str::of() or custom validation logic.
Trade-offs:composer.json and use DomainParser::parse() in validation layers or middleware."*How can I help you explore Laravel packages today?