11-25-2007, 02:00 AM
|
#4 (permalink)
|
|
The Acquainted
Join Date: Sep 2007
Location: Arizona
Posts: 114
Thanks: 10
|
Well, what you could do.. is just use explode. Make sure the domain is formatted like: www.domain.com.uk or whatever (without slashes or beginning http://), and then just do this:
PHP Code:
/* First get rid of http:// and trailing slash */ $szDomain = 'www.domain.co.uk'; $szKeyword = explode('.', $szDomain); echo $szKeyword[2];
The only error I see this having, if they enter something like: www.sub.domain.com for example, but even then, they shouldn't have the www in front, so it would still work.
|
|
|