Hi,
Thursday, August 28, 2003, 6:30:44 PM, you wrote:
CcM> Quick question...
CcM> I parse domains in my scripts like this to get the .domain.com out of
www.domain.com. However, if someone visits my site with just domain.com in the url, I
get .com back as the parsed domain.
CcM> How can I make it so I aways get the .domain.com no matter what they use?
CcM> Here is an example of what I use now...
CcM> $parseddomain = preg_replace('/.+?(\..+)/', '$1', $domain);
CcM> --
CcM> _______________________________________________
CcM> Get your free Verizonmail at www.verizonmail.com
do a str_replace('/www.','/',$parseddomain); then do your preg_replace
--
regards,
Tom
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php