How to get the name of the host from a URL like Mega, 4shared among others with PHP?
In case you would like to know having this URL as an example:
How can I get from this URL only the word MEGA
discarding everything else?
I found this type of code on the internet which takes the host name only does not do what I want because it still leaves the www and the domain I just want to leave the host name.
$host = $_SERVER['HTTP_HOST'];
echo $host;