i want only domain name without sub domain and path URL.
Example :
URL loading in browser : https://www.example.com/something
. I want only example.com
I tried echo $_SERVER['HTTP_HOST'];
and echo $_SERVER['SERVER_NAME'];
but the output is www.example.com
but it want example.com
as output.
What to use?