10-23-2007, 01:33 AM
|
#7 (permalink)
|
|
La Vida es Sueño
Join Date: Sep 2007
Location: Oldham
Posts: 2,280
Thanks: 90
|
You also really want to check for if they enter the www. part of the domain which they could do, and act accordingly, else your extension is going to be incorrect.
PHP Code:
$domain = 'www.salathe.co.uk'; $limit = 2;
if(substr($domain, 0, 4) == 'www.') { $limit = 3; }
$extension = array_pop(explode('.', $domain, $limit));
__________________
The man who comes back through the Door in the Wall will never be quite the same as the man who went out.
|
|
|