Validation
Validating domain names, IDNs and email addresses.
- Punycode in PHP: Convert IDNs with idn_to_ascii()
Punycode in PHP: call idn_to_ascii() and idn_to_utf8() with the right flags, avoid the ß-to-ss trap, read IDNA error bits and spot homograph domains.
- PHP Email Validation: filter_var, MX Checks and IDNs
PHP email validation that works: what FILTER_VALIDATE_EMAIL rejects, handling IDN domains and null MX, and when egulias/email-validator is worth it. 10 tests.
- Public Suffix List in PHP: Get the Registrable Domain
Use the Public Suffix List in PHP to turn shop.example.co.uk into example.co.uk: a parser for all 10,398 rules, or php-domain-parser via Composer.
- Validate a Domain Name with Regex in PHP (Tested)
Validate domain names with a regex in PHP: a tested pattern for 63-char labels and 253-char names, IDN support, and 17 test cases compared with filter_var().