Yngvarr

Generation

generate functionSun, 19 Mar 2023

get tdl with domain

function get_tld($domain) { if (preg_match("/(?P<domain>[a-z0-9][a-z0-9\-]{1,63}\.[a-z\.]{2,6})$/i", $domain, $matches)) return $matches['domain']; return ''; }

Questions about programming?Chat with your personal AI assistant