Function set_tld_regex
Creates an optimized regex to match all known top level domains.
The optimized regex is stored in $modSettings['tld_regex'].
To update the stored version of the regex to use the latest list of valid TLDs from iana.org, set the $update parameter to true. Updating can take some time, based on network connectivity, so it should normally only be done by calling this function from a background or scheduled task.
If $update is not true, but the regex is missing or invalid, the regex will be regenerated from a hard-coded list of TLDs. This regenerated regex will be overwritten on the next scheduled update.
Package: SMF
Copyright: 2020 Simple Machines and individual contributors
License: BSD
Author: Simple Machines https://www.simplemachines.org
Located at Sources/Subs.php
Copyright: 2020 Simple Machines and individual contributors
License: BSD
Author: Simple Machines https://www.simplemachines.org
Located at Sources/Subs.php
boolean |
$update = false |
If true, fetch and process the latest official list of TLDs from iana.org. |