Page 1 of 1

Get Domain Name only

Posted: Mon Jun 16, 2008 10:47 am
by tecktalkcm0391
I know that you use $_SERVER['HTTP_HOST'] to get the domain name, but it also has the subdomain like www. or webmail.

How can I just get the website like: devnetwork.net

Re: Get Domain Name only

Posted: Mon Jun 16, 2008 11:36 am
by jayshields
Try experimenting with

Code: Select all

$arr = explode(".", $_SERVER['HTTP_HOST']);