rgb192
asked on
get url (including subdomain)
want the entire page url, including subdomain
I would like (if possible)
subdomain to be $variable1
domain to be $variable2
uri to be $variable3
I would like (if possible)
subdomain to be $variable1
domain to be $variable2
uri to be $variable3
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I generally agree with Medo3777, however the URL might be something like www.atf77.whitehouse.gov/csm/index.php?q=foo.bar so you might want to learn about the PHP functions that parse strings and parse urls. Google those terms and you will find a wealth of generalized solutions for parsing this sort of information.
ASKER
i will have to open a question about a complex url that Ray suggested
$_SERVER['PHP_SELF']
then you can split string by using php functions to get different parts of string. Functions like strpos to get the position of a character inside an string, or functions like substr to get a part of the string.
Here you have the list of all string functions:
http://www.php.net/manual/en/ref.strings.php
Hope it helps.