Thanks! That's silly - I can't believe I missed that. Here's a quicker way to do that using stristr, a case insensitive strstr:
if (stristr($url['host'], ".tk")) // Block the free TLD .tk
$errors[] = 'The TLD .tk is not allowed. Please try again';
Your solution is very elegant! Thanks for shortening the code; I knew there would be an easier way such as you did, but it's been some time since I did programming and never done php.
Bookmarks