southbeach
Programmer
Hello!
Given URL
How do I extract "alias"? Now mind you, "alias" can be anything under the sun. I know the structure since it has to be FQDN but I do not know what the string is (could be: appl.mydomain.co, orange.mydomain.com, grapes.mydomain.com ...).
Also, if the URL address is
how can I extract "SOME-DIRECTORY" given that this is also dynamic as the "ALIAS"?
I know and do not know enough
I want to set $_SESSION['ALIAS'] where 'ALIAS' of the above URL is stored
I want to set $_SESSION['HOST'] where 'MYDOMAINNAME.COM' of the above URL is stored
I want to set $_SESSION['SUBDIR'] where 'SOME-DIRECTORY' of the above URL is stored
Thank you all for your help!
--
SouthBeach
The good thing about not knowing is the opportunity to learn - Yours truly, 2008.
Given URL
Code:
alias.mydomain.com
How do I extract "alias"? Now mind you, "alias" can be anything under the sun. I know the structure since it has to be FQDN but I do not know what the string is (could be: appl.mydomain.co, orange.mydomain.com, grapes.mydomain.com ...).
Also, if the URL address is
Code:
alias.mydomain.com/SOME-DIRECTORY/
how can I extract "SOME-DIRECTORY" given that this is also dynamic as the "ALIAS"?
I know and do not know enough
Code:
list($var,$var,$var...)=explode(".", [NOT SURE WHAT TO USE HERE]);
I want to set $_SESSION['ALIAS'] where 'ALIAS' of the above URL is stored
I want to set $_SESSION['HOST'] where 'MYDOMAINNAME.COM' of the above URL is stored
I want to set $_SESSION['SUBDIR'] where 'SOME-DIRECTORY' of the above URL is stored
Thank you all for your help!
--
SouthBeach
The good thing about not knowing is the opportunity to learn - Yours truly, 2008.