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
Get Domain Name only
Moderator: General Moderators
- tecktalkcm0391
- DevNet Resident
- Posts: 1030
- Joined: Fri May 26, 2006 9:25 am
- Location: Florida
- jayshields
- DevNet Resident
- Posts: 1912
- Joined: Mon Aug 22, 2005 12:11 pm
- Location: Leeds/Manchester, England
Re: Get Domain Name only
Try experimenting with
Code: Select all
$arr = explode(".", $_SERVER['HTTP_HOST']);