ok, if you are reading my post here its because you want to know how you can get the current domain name with php but without the www part. well, www is the host name and the TLD is the domain name..

so for example, lets use www.wallpaperama.com you are currently visiting www.wallpaperama.com and i want to remove the www. part, so this is how my php code would look like

$domain = "$_SERVER['HTTP_HOST']";
echo $domain;
OUTPUT: www.wallpaperama.com

now this is how i would remove the www part:

$domain = str_replace("www.","", $_SERVER['HTTP_HOST']);
echo $domain;
OUTPUT: wallpaperama.com

as you can see i removed the www. part with the str_replace() function from php, this way it will only show or display the TLD and not the hostname (www)

hope this helps