Acquire the url prefix? |
[eluser]coldscooter[/eluser]
Is there any nice way of detecting the url prefix? so for this url: http://test.mysite.com I would like to extract 'test'
[eluser]CroNiX[/eluser]
They're "subdomains", not "prefixes". This will probably work, but it will only return the first subdomin. For instance, if your url was http://some.subdomain.domain.com, it would only return "some". If there isn't a subdomain, like http://domain.com, it will return boolean FALSE. Code: function get_subdomain($url)
[eluser]CroNiX[/eluser]
Strange, the forum software is inserting commas where there are none. |
Welcome Guest, Not a member yet? Register Sign In |