I am new to PHP world and I would like to be able to get any subdomain typed on the URL, for example if the URL is mike.myapp.com I would like to get "mike", if the URL is "james.myapp.com" I would like to get "james" and so on.
How this is done with PHP?